Errors & limits
Errors use the OpenAI error object, so SDKs surface them the same way:
{
"error": {
"message": "Invalid proxy server token passed.",
"type": "auth_error",
"code": "invalid_api_key"
}
}Status codes
| Status | Usually means | What to do |
|---|---|---|
400 | Malformed JSON or a required field missing. | Fix the request body. |
401 | Missing, malformed or revoked key, or the key lacks this group. | Check /v1/models; ask for a key. |
403 | The path is not part of the public API. | Use a documented endpoint. |
404 | Unknown route or resource. | Check the path or id. |
422 | Validation failed, or the key is over budget. | Inspect error.message; top up. |
429 | Key or upstream rate limit. | Back off and retry. |
500 | Internal proxy error. | Retry once; report with a request id. |
502/503 | Upstream provider error or no healthy upstream. | Retry; fallback may already have run. |
504 | Upstream timed out (router timeout is 600 s). | Stream, or lower max_tokens. |
Retries and fallbacks
The router retries a failed call twice and falls back from deepseek-v4-pro to
deepseek-flash. Retries are automatic but not infinite. If a provider is down and
the fallback also fails, the client sees the upstream status.