Rate limits
Updated
Use the returned rate-limit and retry headers to pace work within your workspace's limits.
Billing and credit purchases are not open yet. Workspace usage limits still apply; see Billing and credits.
Limits
These defaults apply unless your workspace or key has a different limit. These are usage caps.
| Limit | Default |
|---|---|
| Requests a minute, per key | 600 |
| Calls in flight, per workspace | 16 |
| Decisions a UTC month, per workspace | 3,000,000 |
| Model calls a UTC day, per workspace | 100,000 |
| Requests a minute, per Playground key | 30 |
The monthly cap counts answered decisions, including Playground runs, and excludes replays. The daily cap counts every call sent to the model, including answered, refused, failed and Playground calls.
| Code | Action |
|---|---|
rate_limit_exceeded | Wait for Retry-After and pace requests to the returned limits. |
concurrency_limit_exceeded | Reduce work in flight and follow Retry-After. |
workspace_limit_exceeded | Reduce concurrent work or input load and follow Retry-After. |
monthly_cap_reached | Follow resets_at and Retry-After for the workspace's monthly cap. |
playground_daily_limit | Wait for resets_at before another Playground run. |
capacity_exhausted | Wait for Retry-After and use bounded retries. |
These refusals return HTTP 429. Limits can be specific to the key or workspace.
Headers
X-RateLimit-Limit- The request limit for the key window.
X-RateLimit-Remaining- What remains in that window.
X-RateLimit-Reset- The Unix second when the window resets.
Retry-After- The wait in seconds before retrying.
Retry-After-Ms- The wait in milliseconds; prefer it when both wait headers are present.
The key-window headers appear once the limiter has run. A monthly_cap_reached refusal includes monthly_request_cap, used and resets_at in error.details.
Retries
Read error.retryable and x-should-retry. Keep the same Idempotency-Key and JSON body for the decision's retries, and stop automatic retries when the flag is false.
See Idempotency for replay behavior and Errors for other refusals.