Errors
Status codes, what to retry and what not to.
Errors use the OpenAI error shape, so an existing client's handling works unchanged. A provider's own error body is forwarded verbatim; everything we generate ourselves is a fixed message with a stable code.
Status codes
| Field | Type | Description |
|---|---|---|
400 | invalid_request | Malformed body, or a parameter the model does not support. |
401 | unauthorized | Missing, malformed, revoked or expired key. |
402 | insufficient_credits | The wallet or the key's spend limit cannot cover the request. |
403 | forbidden | The model is disabled, or not on this key's allow-list. |
404 | not_found | No such model or endpoint. |
429 | rate_limited | Key rate or concurrency limit. Honour Retry-After. |
5xx | upstream_error | The provider failed. The hold is released in full. |
Retrying safely
- Retry
429and5xxwith exponential backoff and jitter. - Never retry
400,402or403. They will not succeed on a second attempt. - A failed request settles at zero. Retrying does not double-charge you for the attempt that failed.
Request ids
Every response carries an X-Request-Id. Quote it when asking about a specific call; it is the key to the whole log line, including the model actually served and the exact amount charged.