Error envelope
Every error response follows the OpenAI-compatible JSON shape:HTTP status codes
| Status | Meaning | Typical cause |
|---|---|---|
400 | Bad request | Invalid parameters, missing required fields, schema violation |
401 | Unauthorized | Missing or invalid API key |
402 | Payment required | Account quota exhausted |
403 | Forbidden | Token has no permission for this model / group |
404 | Not found | Model or endpoint doesn’t exist |
429 | Too many requests | Rate limit hit — see Rate Limits |
500 | Internal error | OrcaRouter-side bug |
502 | Upstream error | All upstream providers failed (including fallback chain) |
503 | Service unavailable | Temporary outage |
Streaming errors
Errors during a streamed response are emitted as SSE events, not HTTP status codes (the status was already sent when the stream opened). A streaming failure ends with:[DONE].
Fallback errors
Whenextra_body.models is set and all models in the chain fail, you
get a 502 with details about the last upstream error. The response
headers X-Orca-Fallback-Level and X-Orca-Fallback-Model indicate
which fallback was being tried when the chain exhausted. See
Response Headers.
Upstream vs OrcaRouter errors
- Upstream errors (content policy violations, context length exceeded,
provider outage) are returned with the provider’s own
messageandtype, prefixed with a context marker so you can tell them apart. - OrcaRouter errors (quota exceeded, rate-limited, model not found in
your group) originate from our gateway and carry OrcaRouter-specific
codes like
model_price_error,quota_insufficient,fallback_exhausted.
error.type
field against the list documented per endpoint.