≡ All docs
API Guide / Error Codes
Error Codes
Updated: 2026-02-05
Error Format
All error responses are JSON and contain an error field:
JSON
{"error": {"code": "invalid_api_key","message": "Invalid API key provided.","type": "authentication_error","request_id": "req_01H8XYZ..."}}
Error Code List
| Parameter | Type | Required | Description |
|---|---|---|---|
| 400 | invalid_request_error | Optional | Bad request parameters; check the JSON structure and fields |
| 401 | authentication_error | Optional | API Key missing or invalid; re-check the Authorization header |
| 403 | permission_denied | Optional | No access to this resource or model |
| 404 | not_found | Optional | Resource not found; check the model ID / file ID |
| 429 | rate_limit_exceeded | Optional | Rate limit hit; see the Rate Limits section |
| 500 | server_error | Optional | Platform-side error; contact support with the request_id |
| 503 | service_unavailable | Optional | Upstream model temporarily unavailable; retry later |
Retry Strategy
For 429 and 5xx errors, use exponential backoff retries (start 1s, max 30s, up to 5 attempts). Do not retry 4xx errors — fix the parameters first.
Didn't find what you were looking for?Contact us →