Limits and errors
Rate limits, error codes and retries
Rate limits
| Calls | Limit per token |
|---|---|
| All requests | 120 per minute |
| Credit-spending and publishing calls | 20 per minute |
Over the limit, the API returns 429 rate_limited with a Retry-After
header (seconds). Wait that long before retrying.
Errors
Errors share one shape:
{
"error": { "code": "insufficient_credits", "message": "Not enough credits" },
"requestId": "req_…"
}| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_argument | The body or query failed validation; message names the field |
| 401 | unauthenticated | Missing, expired or revoked token |
| 402 | insufficient_credits | Buy credits; the error includes purchaseUrl |
| 403 | forbidden | The token lacks the scope, or the workspace is outside its binding |
| 403 | feature_disabled | The Studio API is not enabled for this account |
| 404 | not_found | The resource does not exist or is not visible to you |
| 409 | confirmation_required | The action needs explicit confirmation (MCP tools) |
| 429 | rate_limited | Slow down; see Retry-After |
| 502 | upstream_error | A generation or social platform call failed; retry later |
Retries
Retry 429 and 502 with exponential backoff. Do not retry 4xx errors
other than 429 without changing the request. Before retrying a
credit-spending call after a timeout, check your media library or posts so
you don't generate twice.