X-Request-Id header; include it when contacting support.
The error envelope
type follows the OpenAI convention (invalid_request_error, authentication_error, permission_error, rate_limit_error, server_error). code is the precise machine-readable reason, and param names the offending request field when there is one.
Status codes
Error code reference
Handling errors
- Retry
5xxand429with exponential backoff; honorRetry-Afterwhen present. - Do not retry
400/401/402/403/404unchanged; fix the request or account state first. - Use idempotency keys so network-level retries can never double-bill.
- Log the
X-Request-Idheader with failures; it lets support trace the exact request.