Docs menu

Docs / Reference

Errors

Every error code Cent AI returns, its HTTP status and where to read more.

Last updated


Shape of an error

Errors use the format of the endpoint you called.

{"error": {"message": "Invalid API key.", "type": "authentication_error", "param": null, "code": "invalid_api_key"}}

In the OpenAI format the code field names the error. In the Anthropic format the error type follows the HTTP status and the message says what happened. Every response, including errors, has an x-request-id header; the same ID is on the Requests page of the dashboard.

Order of checks

Before a request reaches a model, Cent AI checks, in this order: the request body, the key, whether the key's project is archived, whether the endpoint is available, the key's IP and model allowlists, the model name, the rate limit, the key's spending limits, the project budget and the balance. The first check that fails decides the error. Nothing is charged for a request rejected here.

All codes

CodeHTTPMeaning
invalid_request400The request body is not valid
invalid_api_key401The key is wrong, revoked, or belongs to a blocked account
insufficient_balance402No balance available for this model
ip_not_allowed403The request comes from an IP outside the key's allowlist
model_not_allowed403The model is outside the key's model allowlist
project_archived403The key belongs to an archived project
model_not_found404The model does not exist or is not available
request_too_large413The body is larger than 32 MiB
rate_limited429Over the key's requests per minute
key_limit_exceeded429The key reached its daily or monthly limit
project_budget_exceeded429The project reached its daily or monthly budget
not_available_yet501The endpoint is not open yet
internal_error500 or 503An error inside Cent AI
upstream_unavailable503The model is temporarily unavailable on every route
upstream_rate_limited503The model is rate limited on every route
upstream_timeout503The model did not start answering in time, or a stream reached its maximum duration
upstream_errorThe model's statusThe model rejected the request, for example an unsupported parameter

Cent AI never returns HTTP 502 or 504; failures of the model come back as 503 with one of the codes above.

By status

  • 4xx errors: problems with the request, the key, the limits or the balance
  • 5xx errors: problems with the model or with Cent AI
  • Stream timeout: streams that stop or never start

Endpoints that are not open yet

Video, speech, transcription and embeddings endpoints return 501 and are not charged. The image endpoints are open; see Images.

{"error": {"message": "This endpoint is not available yet.", "type": "invalid_request_error", "code": "not_available_yet"}}