DocsAPI errors

API errors

API reference

Zukko reports errors with a regular HTTP status and a JSON body in the OpenAI format. Handle errors by status and error.code, not by text: Zukko's own error messages are in Russian and may change.

1Error format

json
{
  "error": {
    "message": "Модель 'gpt-5.4' снята с обслуживания. Используйте 'gpt-5.6-sol' — актуальный список: GET /v1/models. Поддержка — https://t.me/zukkopro?direct, напишите, пожалуйста.",
    "type": "invalid_request_error",
    "code": "model_retired",
    "param": "model"
  }
}
  • error.message is always present;
  • error.code is set on every Zukko error except 401;
  • error.type and error.param appear where they apply.

Every error message ends with a support line: "Поддержка — https://t.me/zukkopro?direct, напишите, пожалуйста." (Support — write to us on Telegram.) A 401 also has a top-level "type": "error" and error.type: "authentication_error". A 403 email_unverified duplicates message and code at the top level.

2Error codes

StatusCodeWhenRetry?
400model_retiredthe model was retired; the message names its replacementno, change the model
400invalid_jsonthe body is not JSON (GLM, web search, images)no, fix the request
400invalid_requestweb search without queryno
400invalid_request_errorimages: no prompt, or no images for an edit modelno
400unknown_glm_modelunknown GLM modelno
401— (authentication_error)the key is missing, mistyped, or revokedno
402insufficient_balancebalance below $0.01 (for images — below the price of one image)after a top-up
403email_unverifiedemail not verifiedafter verification
403model_not_allowed_for_keythe model is not in this key's allowed listno
404model_not_foundthe model is not in the catalog; the request does not reach a provider and is not chargedno, fix the name using GET /v1/models
404not_foundunknown pathno
405method_not_allowedwrong HTTP methodno
413payload_too_largerequest body larger than 32 MBno, make it smaller
422idempotency_conflictthe Idempotency-Key was already used with a different bodyno, use a new key
429key_daily_limit_reachedthe key's daily cap is used upafter 00:00 UTC, or raise the cap
429key_monthly_limit_reachedthe key's monthly cap is used upnext month (UTC), or raise the cap
429provider's coderate limit on the model provider's sideyes, with backoff
502upstream_unreachablethe model provider did not respondyes, with backoff
502web_search_failedweb search failedyes
502image_generation_failedimage generation failedyes
503model_disabledthe model is temporarily switched offno, pick another from GET /v1/models
503provider_unavailablethe model provider is temporarily unavailableyes, with backoff or another model
503maintenancemaintenance; comes with Retry-After: 600yes, after Retry-After seconds
503image_provider_unavailable, image_provider_busythe image service is down or overloadedyes, later
504image_generation_timeoutimage generation took longer than 3 minutesyes

Zukko has no request rate limiting of its own. A 429 from Zukko only means a key limit that you set yourself. Any other 429 comes from the model provider.

3Provider errors

Errors returned by the model provider are passed through with the same status and text — for example, context length exceeded or an invalid parameter. Exceptions:

  • if the provider answered 402, you get 503 provider_unavailable — it is not about your balance;
  • if the error text explains nothing, Zukko replaces it with its own: for 5xx — "the model provider is temporarily unavailable, retry later", for 4xx — "the model provider rejected the request, check the parameters";
  • for 5xx errors Zukko appends the list of models that are working right now.

A 500 with the body {"error": "Internal server error"} means a failure on Zukko's side — retry, and if it persists, contact support.

4Errors inside a stream

With stream: true the 200 status is sent before the model's answer. If an error happens after that, it arrives inside the stream as an event with an error field. Check the stream events, not just the HTTP status. A stream that carried only an error — no text and no usage — is not billed. See Streaming.

5Retrying

  • retry provider 429, 500, 502, 503 (except model_disabled), and 504 with exponential backoff;
  • on 503 maintenance wait the number of seconds in Retry-After;
  • do not retry other 4xx — fix the request, key, or balance;
  • add an Idempotency-Key header: a retry of a request that already completed returns the stored response and is not charged again. Send the retry after the first request has finished — see idempotency.
API errors · Zukko Docs