Errors
Chat errors are OpenAI-shaped. The body is { "error": { "message", "type", "code" } }. Every chat response includes X-Request-ID.
| Status | Code | Type |
|---|---|---|
| 400 | invalid_request | invalid_request_error |
| 400 | model_not_found | invalid_request_error |
| 401 | unauthorized | authentication_error |
| 413 | payload_too_large | invalid_request_error |
| 429 | insufficient_credits | insufficient_quota |
| 429 | rate_limited | rate_limit_error |
| 500 | internal_error | server_error |
| 503 | service_unavailable | server_error |
What to do
400 invalid_request means the body is wrong for that model — an unknown model id, a parameter the model does not list, or a value outside its limits. The message says what that model accepts.400 model_not_found means the id is not in the catalog.
401 is the key: missing, malformed, unknown, or revoked. 413 means the body exceeds 10 MB. 429 insufficient_credits needs a top-up. 429 rate_limited should wait for Retry-After. 500 and 503 are retryable — send the request id with a support ticket if they persist.