API
Errors
Errors follow the OpenAI shape: { error: { message, type, code } }.
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request_error | The request is invalid. Please check and try again. |
| 400 | context_length_exceeded | The input exceeds this model's maximum context length. |
| 401 | invalid_api_key | The API key is invalid or has been disabled. |
| 402 | insufficient_quota | Insufficient balance. Please top up to continue. |
| 402 | daily_limit_exceeded | The daily spending limit for this account has been reached. |
| 403 | permission_denied | You do not have permission to perform this action. |
| 404 | model_not_found | The model does not exist or you do not have access to it. |
| 429 | rate_limit_exceeded | Too many requests. Please slow down and try again. |
| 429 | key_budget_exceeded | This API key has reached its monthly budget. |
| 502 | upstream_error | The model provider returned an error. Please try again later. |
| 503 | service_unavailable | The service is temporarily unavailable. Please try again later. |
| 504 | upstream_timeout | The model provider timed out. Please try again later. |
| 500 | internal_error | Something went wrong on our side. Please try again later. |
Retry 429 and 5xx with exponential backoff; 429 responses include Retry-After and x-ratelimit-* headers.