Docs / Reference
4xx errors
What each 4xx code from Cent AI means, the usual cause in a tool, and how to fix it.
Last updated
A 4xx response means Cent AI rejected the request before it reached a model. Nothing is charged. To see the details later, open Requests in the dashboard and look up the x-request-id of the response.
400 invalid_request
The body is not valid for the endpoint, for example a missing model or messages, or JSON that does not parse.
Check the body against Chat Completions, Responses or Messages. A tool that sends one format to another endpoint, such as an Anthropic body to /v1/chat/completions, gets this error: check the base URL of the tool.
401 invalid_api_key
"Invalid API key. Check the key or create a new one in the dashboard."
- The key was mistyped, cut off when pasted, or has spaces around it.
- The key was revoked. Create a new one in Keys.
- A management key (
cai_mgmt_…) was used on a model endpoint. Use an API key (cai_…).
402 insufficient_balance
"Your balance is empty. Top up or buy a package in the dashboard."
The balance available for this model is zero or less. Top up or buy a budget pack. If you have pack budget but still get 402, the model is not included in your pack: the message names the pack it needs, and pay-as-you-go balance works for every model. See Balance.
403 ip_not_allowed, model_not_allowed, project_archived
ip_not_allowed: the key has an IP allowlist and the request came from another address. Add the address to the key, or remove the allowlist.model_not_allowed: the key has a model allowlist without this model. Add the model to the key.project_archived: the key belongs to an archived project. Restore the project to use its keys again.
404 model_not_found
"The model '{model}' does not exist or is not available."
Use a model name exactly as listed by GET /v1/models. If your tool fills in a model name for you, set it by hand to a name from that list.
413 request_too_large
The body is larger than 32 MiB. Send fewer or smaller files, or shorten the conversation.
429 rate_limited
"Rate limit of 600 requests per minute for this key was exceeded. Retry after {n} seconds."
Wait for Retry-After seconds. Agents running many parallel tasks on one key hit this first; spread the work over several keys or ask support for a higher limit. See Rate limits.
429 key_limit_exceeded
"This key reached its {daily|monthly} limit. Raise the limit or wait until {reset_at}."
The limit you set on the key was reached. Raise it in Keys, or wait until the time in the message.
429 project_budget_exceeded
"This project reached its {daily|monthly} budget. Raise the budget or wait until {reset_at}."
The budget of the key's project was reached. Other projects keep working. Raise the budget in Projects, or wait until the time in the message.
501 not_available_yet
"This endpoint is not available yet."
The endpoint is not open yet. Chat endpoints are available now. See Errors.
When to contact support
If an error does not match its description here, write to support@cent-ai.dev with the x-request-id of the response. Do not send your API key.