uncensored opencode

Errors

What each status means and what to do about it. Nothing is charged for a request that ends in one of these before a model answers.

The shape

OpenAI and Responses formats
{"error": {"message": "...", "type": "...", "code": "...", "param": null}}
Anthropic format
{"type": "error", "error": {"type": "...", "message": "..."}}

By status

StatusCodeMeaningWhat to do
400model_not_foundThe model id is not on this API. The message lists the ids that are. The Anthropic format answers 404 for this.Use an id from Models
400context_length_exceededThe conversation is longer than the model's contextShorten it or compact the session
400tool_choice_unsupportedThe model only takes tool_choice: "auto"Send auto, or use another model
400images_unsupported, too_many_imagesThe model does not take images, or not that manyUse a model that lists images
401The key is missing, wrong or turned offCheck the header and the key
402budget_exceededNot enough credit for this request. The message says what it needed and what you have.Add credit
402key_budget_exceededThe key has reached its spend cap. Account credit is untouched.Raise the cap or use another key
413request_too_largeThe request body is over 32 MBSend less
429rate_limitedMore than 1,200 requests a minute from one accountWait the seconds in retry-after
429account_pausedRepeated requests with no credit paused the accountAdd credit
503temporarily_unavailableThe model is busy. The Anthropic format answers 529.Try again in a minute

In a stream

A failure after the stream has started arrives as an error chunk in the OpenAI format and as an error event in the Anthropic format, rather than as a status.

max_tokens is never an error

An output limit higher than the model or your credit allows is lowered to fit, silently. It does not fail the request.