Clatter LabsHelp Center

What does a Model API error look like?

ReferenceUpdated

Model API errors use the OpenAI error shape, with a stable code you can branch on and a message written for people.

{
  "error": {
    "message": "The model \"foo\" does not exist. See GET /v1/models.",
    "type": "invalid_request_error",
    "code": "model_not_found",
    "param": null
  }
}

The fields#

  • code: stable and machine-readable. Branch on this, never on the message text.
  • message: a human explanation. It can change wording over time.
  • type: the OpenAI-style category, such as authentication_error, invalid_request_error or permission_error.
  • param: the field that caused the error, when there is one (for example model).

Some errors add fields: account_suspended carries resets_at, appeal_url and policy_url; model_retired carries replacement and retired_at.

Headers#

  • X-Request-Id on every response, success or error.
  • Retry-After on 429 and on many 5xx responses, in seconds.

Status codes at a glance#

StatusCodes
400invalid_request, invalid_json, unsupported_content, unsupported_parameter, invalid_effort
401invalid_api_key, expired_api_key, missing_account_id, account_mismatch
402out_of_credits
403insufficient_scope, account_suspended
404model_not_found, not_supported
410model_retired
413request_too_large
429rate_limited
502 / 503 / 504model_overloaded, model_unavailable, model_timeout, empty_response, stream_error

Source: Model API reference.

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.