Guides
Errors
Error handling and status code reference.
Errors are returned as JSON in the same shape as OpenAI: { "error": { "message": "...", "type": "..." } }.
| Status | Cause | Fix |
|---|---|---|
| 400 | Invalid request body | Check your JSON and required fields |
| 401 | Bad or missing API key | Verify the Authorization header |
| 402 | Insufficient balance | Top up on the Billing page |
| 404 | Model not found | Use an id from /v1/models |
| 429 | Rate limit | Retry with backoff |
| 5xx | Upstream failure | Retry or switch models |
error.json
{"error": {"message": "Invalid API key provided","type": "invalid_request_error"}}