Errors
Errors use the OpenAI shape, so a client that already handles them needs no change.
| Status | Code | What to do |
|---|---|---|
| 401 | missing_api_key, invalid_api_key | Check the Authorization header. A revoked key, an expired key and a suspended account all answer the same way. |
| 402 | insufficient_credit | Top up. X-Zanii-Topup-Url points at the console. |
| 403 | model_not_allowed | This key is restricted to other models. |
| 402 | spend_cap_reached | The account passed its monthly ceiling. Raise it in the console. |
| 409 | idempotent_replay | This request id was already served. Send a new one. |
| 501 | embeddings_not_supported | This deployment's model server has no embedding model. |
| 501 | not_supported_by_model_server | This deployment's model server does not serve that route. The message names what to use instead. |
| 503 | tokenizer_unavailable | The model server cannot count tokens right now. |
| 404 | model_not_found | The model is not in the catalogue. |
| 429 | rate_limit_exceeded, too_many_concurrent_requests | Back off; Retry-After says how long. |
| 502 | upstream_error | The model server failed. The call is not charged. |
| 503 | receipts_unavailable | The key requires a receipt and none could be signed. The call is not charged. |
A refused call never reaches the model, and is never billed.