Limits and errors
Errors use the OpenAI format, {"error": {"message", "type", "code"}}, with the status codes below.
One request at a time
Each account runs one request at a time. A second request waits up to 5 seconds for the first to finish, then returns 429 concurrent_request_limit. If your tool sends requests in parallel, for example with subagents, limit it to one at a time.
Status codes
| Status | Code | Meaning |
|---|---|---|
| 400 | model_required | The request has no model, or its body is not valid JSON. |
| 401 | invalid_api_key | The API key is missing, wrong, or revoked. |
| 402 | insufficient_credits | Your balance is too low. Top up and retry. |
| 404 | model_not_found | The model id is not one of the active models. |
| 413 | request_too_large | The request body is over 8 MiB. |
| 429 | concurrent_request_limit | Another request from your account is still running. |
| 429 | rate_limited, rate_limit_exceeded | Too many requests. Wait for the Retry-After header, then retry. |
| 503 | under_capacity | The model is temporarily unavailable. Retry shortly. |
Retrying
Retry 429 after the Retry-After header and 503 after a short wait, with backoff. Don't retry 400, 401, 402, or 404; fix the request or the account first.