Workspace and credits
How the workspace, the plan and the credit balance work in the API
Every API call happens inside a workspace, and it is that workspace's credit balance that gets spent when you create submissions.
The workspace of a request
The API key resolves to a workspace on every request (see Authentication about single and multi-workspace keys). To inspect which workspace was resolved, with plan, role and member count:
curl https://api.cut.pro/api/v1/workspace \
-H "X-Api-Key: $CUTPRO_API_KEY"{
"id": "7401220118845503",
"name": "Example Studio",
"is_personal": false,
"role": "admin",
"plan_name": "Pro",
"plan_is_free": false,
"credits": 480,
"credits_unlimited": false,
"member_count": 4
}How credits are spent
Credits belong to the workspace, not to the key. A multi-workspace key spends from the workspace picked by the X-Workspace-Id header.
The charge happens on submission. Credits are deducted the moment you call POST /clips. Analyzing with POST /clips/info costs nothing and shows the credits_cost before you commit.
1 credit equals 1 processed minute. The cost is proportional to the stretch of video you send for processing (the timeframe), so narrowing the stretch lowers the cost.
When the balance does not cover the submission, POST /clips answers 402 INSUFFICIENT_CREDITS, and extra carries credits_needed and current_balance.
Checking the balance
Current workspace balance:
curl https://api.cut.pro/api/v1/balance \
-H "X-Api-Key: $CUTPRO_API_KEY"{
"balance": 480,
"unlimited": false,
"unlimited_until": null
}Ledger of movements (credits added and spent):
curl https://api.cut.pro/api/v1/balance/history \
-H "X-Api-Key: $CUTPRO_API_KEY"Want to predict the cost before submitting? Call POST /clips/info with the video URL: the response carries credits_cost, discount_percent and current_balance.