What does a Model API error look like?
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_errororpermission_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-Idon every response, success or error.Retry-Afteron429and on many 5xx responses, in seconds.
Status codes at a glance#
| Status | Codes |
|---|---|
| 400 | invalid_request, invalid_json, unsupported_content, unsupported_parameter, invalid_effort |
| 401 | invalid_api_key, expired_api_key, missing_account_id, account_mismatch |
| 402 | out_of_credits |
| 403 | insufficient_scope, account_suspended |
| 404 | model_not_found, not_supported |
| 410 | model_retired |
| 413 | request_too_large |
| 429 | rate_limited |
| 502 / 503 / 504 | model_overloaded, model_unavailable, model_timeout, empty_response, stream_error |
Source: Model API reference.
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
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.xyzFor deleting your whole account or the data of one service.