Errors & rate limits
Errors use OpenAI's shape, so SDKs raise them the way they raise OpenAI's. Every response carries an x-request-id.
| status | code | meaning |
|---|---|---|
| 401 | invalid_api_key | missing, wrong or revoked key |
| 402 | insufficient_balance | top up, or pay this request with x402 |
| 400 | invalid_buyback_token | x402 only: the X-Buyback-Token is not a mint, or not eligible for buybacks |
| 404 | model_not_found | unknown or unlisted model id |
| 429 | rate_limited | over the rate limit of 600 requests per minute per key; wait for Retry-After |
| 503 | no_capacity | no capacity for this model right now; wait for Retry-After |
error body
{
"error": {
"message": "Insufficient balance: this request needs about $0.0123.",
"type": "insufficient_balance",
"code": "insufficient_balance",
"param": null
},
"request_id": "7f3c..."
}We retry a failed upstream attempt for you once before the first byte of a response; a stream that has started is never switched mid-way, and media generations are never retried. Quote the x-request-id when you contact us.