Errors
Error format and common status codes.
Errors use the OpenAI-style JSON shape:
{
"error": {
"message": "Invalid token (request id: ...)",
"type": "new_api_error",
"code": ""
}
}Include the request ID from the message when contacting support.
| Status | Meaning | What to do |
|---|---|---|
401 | Missing or invalid API key | Check the Authorization header and that the key is enabled. |
403 | Balance used up (insufficient_user_quota) or key limit reached | Top up in the console or raise the key's limit. |
429 | Rate limited | Retry with exponential backoff. |
5xx | Upstream or gateway error | Retry; if it persists, try another model or contact support. |