Errors
Every error uses the format of the API you called.
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing, unknown, revoked, disabled or expired key |
| 402 | budget_exceeded | A budget would go over; the message says which and when it resets |
| 403 | model_not_allowed | The model isn't in your access or the key's list |
| 403 | account_suspended | The account is suspended |
| 404 | route_not_found | That endpoint isn't available |
| 413 | request_too_large | Body over 32 MB |
| 429 | rate_limited | Key limit or upstream limit; see Retry-After |
| 502 | upstream_unreachable | The upstream didn't answer |
| 504 | upstream_timeout | The upstream took too long |
Shapes
The same budget error in each format. OpenAI:
{ "error": { "message": "...", "type": "insufficient_quota", "code": "budget_exceeded" } }Anthropic:
{ "type": "error", "error": { "type": "billing_error", "message": "..." } }Gemini:
{ "error": { "code": 402, "message": "...", "status": "RESOURCE_EXHAUSTED" } }