Reference
Limits and billing
Two limits apply: a request rate per key and a number of jobs in flight per workspace. Jobs are paid from the workspace balance, in US dollars.
Request rate
Each key has a request budget per window. Every response says where you stand:
ratelimit-limit: 480
ratelimit-remaining: 479
ratelimit-reset: 60Over the budget you get 429 rate_limited with retry-after. Reads have a larger budget than writes; one poll per job every few seconds stays far inside it.
Jobs in flight
A workspace may have only so many generation jobs queued or running at once. A submit past the cap is refused, not queued, and not charged: 429 queue_full, with your limits in details.generation_limits and a retry_after_seconds. Wait for a job to end, then submit the next; a worker pool sized to the limit keeps you under it.
{
"error": {
"code": "queue_full",
"message": "Workspace generation queue is full. Wait for running jobs to complete before submitting more generation work.",
"request_id": "req_0ee311b4334e4b118a94c7d1c48577fd",
"category": "queue",
"retryable": true,
"retry_after_seconds": 30,
"next_action": "retry_later"
}
}What a job costs
| When | What happens |
|---|---|
| You submit | The price is reserved from the workspace balance. |
| The job completes | The reservation is charged. |
| The job fails or is canceled | The reservation is refunded. |
Each model row from the model endpoints carries its pricing; prices depend on quality, resolution and duration. The list prices are on API pricing, and every charge and refund shows up in Billing in the dashboard.
Running out of balance
A submit the balance cannot cover fails with 402 insufficient_credits and creates no job; a team workspace that has never been funded gets 402 organization_wallet_not_provisioned. With insufficient_credits, details says how much the request needed and how much was available, in dollars. Add funds in Billing; turning on auto top-up keeps long runs from stopping.
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits for this request.",
"request_id": "req_0ee311b4334e4b118a94c7d1c48577fd",
"category": "quota",
"retryable": false,
"retry_after_seconds": null,
"next_action": "add_funds",
"details": {
"required_usd": "0.29",
"available_usd": "0.01"
}
}
}