REFERENCE
Headers & errors
What the gateway tells you about each response, and what its status codes mean.
Response headers
Chat responses include routing headers for auditing. Upstream provider names are never exposed.
| Header | Meaning |
|---|---|
x-egg-requested-model | The model string you sent. |
x-egg-resolved-model | The model that actually served the request. |
x-egg-routing-strategy | Strategy used, or cache on a cache hit. |
x-egg-cache | HIT, MISS or BYPASS. |
x-egg-residency-requested | Residency tag you asked for. |
x-egg-residency-served | Scope that served it (global if degraded). |
Errors
Errors return JSON with a detail message.
| Status | Meaning |
|---|---|
400 | Bad request, e.g. an audio model on the chat endpoint, or an unknown audio model. |
401 | Missing or invalid API key. |
403 | Model not permitted for your key or organization. |
413 | Audio file larger than 25 MB. |
422 | Invalid request, including a malformed model ref. |
429 | Request-rate or monthly token/spend quota exceeded. Honor retry_after. |
503 | Quota enforcement or upstream temporarily unavailable. Retry with backoff. |