Errors
The gateway returns OpenAI-style error objects:
{ "error": { "message": "...", "type": "invalid_request_error", "code": "..." } }| Status | Meaning | What to do |
|---|---|---|
400 | Invalid request (bad params, malformed body) | Fix the request. |
401 | Missing / invalid API key | Check the Authorization header. |
402 | Upstream credit / budget exhausted on a channel | Retry (the gateway shifts channels); contact us if persistent. |
404 | Unknown model or path | Verify the model ID and endpoint. |
413 | Payload too large | Reduce input size. |
429 | Rate limited or over budget | Back off and retry; see Rate limits. |
5xx | Transient upstream / gateway error | Retry with backoff; the gateway auto-fails-over across channels. |
Recommended client behaviour
Section titled “Recommended client behaviour”- Implement exponential backoff on
429and5xx. - Treat
402as transient — multi-channel HA usually recovers on retry. - Surface
400/404to developers (they indicate a request bug, not a transient fault).