Error codes
What each error means and what to do.
Errors are in OpenAI format: {"error": {"message", "type", "code"}}. Branch on code, not on the message text. On the Anthropic endpoint the format is the Anthropic error envelope, and there's no 402.
| HTTP | code | Meaning and action |
|---|---|---|
| 401 | missing_api_key | No key. You need an Authorization: Bearer zs_live_… or x-api-key header. |
| 401 | invalid_api_key | Invalid or revoked key. Create a new one. |
| 402 | insufficient_balance | Balance exhausted. Top up. (On the Anthropic endpoint: 400.) |
| 402 | key_monthly_limit_reached | You've reached this key's monthly spending cap. Raise it on the Keys page. |
| 402 | promo_model_not_allowed | Promo credit only works on specific models. Pick one of those, or top up. |
| 400 | invalid_json | The body isn't valid JSON. |
| 400 | stream_not_supported | Streaming only works on /v1/chat/completions and /anthropic/v1/messages. |
| 404 | not_found | Unknown endpoint. |
| 404 | minimum_discount_not_met | No capacity meets the requested minimum discount. Lower the X-Min-Discount value. |
| 429 | rate_limited | Too many requests. Wait the time indicated in the Retry-After header. |
| 502 | upstream_unavailable | The model provider is unreachable. Try again. |
| 503 | no_sellers_for_model | The model has no available capacity or doesn't exist. Check the /v1/models list. |
| 503 | service_unavailable | Temporary error on our side. Try again in a few minutes. |
Every response carries an x-request-id header. Include it in support requests. support@zsetonai.hu.
Failed request fees
We don't charge for failed or errored requests. Only successful (2xx) responses are charged.
Next
Limits →