402 insufficient_credits
The balance is zero. Add credit in the dashboard under Billing; keys stay valid
and requests succeed again as soon as it lands. The SDKs raise
TokzInsufficientCreditsError so you can route it apart from outages. See
Billing.
400 unknown_model
The name is neither a catalog model nor a ready fine tune in this key’s organization. A key
from another organization gets this same answer, and so does a model that was deleted or has
not finished. message lists the catalog models.
400 invalid_request
The body is malformed. message says what to fix: a choice with fewer than two
options, duplicate option ids, too many texts or questions. The limits are on the
Decisions page, and GET /v1/decide/models returns them live.
429
The per-key rate limit, 120 requests a minute. Batch texts into one request (up to 64)
to do more per call. decide_org_busy means your organization has 16 texts in progress on
hosted fine tunes: wait for the Retry-After seconds and send again.
502 or 503
The model service did not answer (decide_upstream_error) or is saturated
(decide_busy). These are safe to retry after a short wait. The SDKs never retry for
you, because a retry after a timeout could bill twice.
When the response has Retry-After, wait that many seconds. The SDKs hand it to you as
err.retryAfter and err.retry_after.
413 input_too_large
A fine tune with 32 or more labels cannot run a long text on our servers, because each label
needs memory. message gives the longest text that fits, and how much memory running it on
your machine would take. Shorten the text, or use decideLocal.
503 fine_tune_off
Fine Tune is not available right now. Your own model answers this while it is off, and you can
still delete a model or cancel a job in the dashboard.
decideLocal or decide_local fails
decide_local has the same messages, with its own install line.