Get started
Errors
Every Abliterator API error status with its exact message, the OpenAI and Anthropic error formats, which errors to retry, and which ones are billed.
Abliterator returns errors in the format of the endpoint you called: OpenAI-style on /v1/chat/completions, Anthropic-style on /v1/messages. Retry 429 and 502; fix the request for every other 4xx.
Error formats
Errors use the shape of the API you called, so your SDK parses them as it would its own provider's errors.
OpenAI format (/v1/chat/completions, /v1/models and the /api/v1/... account endpoints):
{
"error": {
"message": "Invalid or revoked API key.",
"type": "authentication_error",
"code": 401
}
}
code is the HTTP status as a number.
Anthropic format (/v1/messages):
{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or revoked API key."
}
}
The type field by status:
| Status | OpenAI type |
Anthropic type |
|---|---|---|
| 400 | invalid_request_error |
invalid_request_error |
| 401 | authentication_error |
authentication_error |
| 402 | insufficient_credits |
permission_error |
| 403 | permission_error |
permission_error |
| 404 | not_found |
not_found_error |
| 413 | server_error |
request_too_large |
| 429 | rate_limit_exceeded |
rate_limit_error |
| 500 | server_error |
api_error |
| 502 | upstream_error |
api_error |
Every status
400 Bad Request
The request is malformed, or the model rejected a parameter.
| Message | Cause |
|---|---|
request body must be a JSON object |
The body is not valid JSON, or is not an object |
request body must be a single JSON object |
Extra data after the JSON object |
Starts with `model` is required |
No model field |
`max_tokens` must be a positive integer. |
max_tokens or max_completion_tokens is 0 or negative |
`provider` must be an object with order, only, ignore, allow_fallbacks, sort or max_price. |
An OpenRouter-style provider object with unknown fields |
`provider.sort` must be price, latency or throughput. |
Invalid provider.sort |
no provider can serve this request with the given constraints. |
provider.only, ignore or max_price excluded every endpoint |
| The model's own message | The serving engine rejected a parameter. Example: tool_choice 'specified' is incompatible with thinking enabled on kimi-k3.1-pro-abliterated; send reasoning_effort: "none" with a named tool |
When the model rejects a request (400, 413 or 422 from the serving engine), Abliterator passes that status and message through unchanged in your API's format. The per-model parameter rules are on the models page.
401 Unauthorized
| Message | Cause |
|---|---|
Missing API key. Create one at https://abliterator.ai/keys. |
No key sent |
Invalid credentials: send one abliterator key as `Authorization: Bearer` or `x-api-key`. |
Two different keys in the two headers, or a non-Bearer Authorization header |
Invalid or revoked API key. |
Unknown or revoked key |
See authentication.
402 Payment Required
Nothing can pay for the request, or the key reached its limit.
| Message | Cause |
|---|---|
Your abliterator balance is used up. Add credit or choose a plan at https://abliterator.ai/pricing. |
Free plan, or no monthly credit applies, and the balance is empty |
Your monthly plan credit and your balance are used up. Add credit or turn on auto-reload at https://abliterator.ai/account. |
Paid plan: monthly credit and balance are both empty |
Your monthly plan credit is used up. It resets when your plan renews; this key won't spend your balance. |
A key limited to plan credit has none left |
This API key reached its spend limit. |
The key's lifetime spend limit is used up |
Not enough credit for this request: the prompt alone is estimated at $X and your available balance is $Y. Add credit or shorten the prompt. |
The prompt alone costs more than what is available |
This request allows up to N output tokens, but your available balance covers about M. Lower max_tokens or add credit. |
Your explicit max_tokens costs more than what is available |
"Available" means monthly credit plus balance (or the key's remaining limit, if lower), minus what your other in-flight requests have reserved. Abliterator reserves the prompt plus max_tokens of output for each request while it runs, so many parallel requests with a large max_tokens can hit the last error even with credit left. Lower max_tokens or reduce concurrency. Details are in usage and billing.
403 Forbidden
| Message | Cause |
|---|---|
This key can only spend monthly plan credit, and <model> isn't covered by it. |
A key limited to plan credit called a model that monthly credit does not pay for |
<model> is available on paid plans. Subscribe at https://abliterator.ai/pricing. |
A Free account called a model reserved for paid plans |
Monthly credit currently pays for both models and neither is reserved for paid plans, so you should not see a 403 today. Handle it anyway: it means the request will never succeed with this key.
404 Not Found
| Message | Cause |
|---|---|
Model "<name>" is not available on abliterator. See GET /v1/models. |
Unknown model ID or alias, or an unsupported suffix |
Generation not found. |
GET /api/v1/generation with an ID that does not exist or belongs to another account |
Paths Abliterator does not serve under /v1/ and /api/, such as /v1/responses, /v1/embeddings, /v1/completions or /v1/messages/count_tokens, return 404 with the message Not found. in the OpenAI format, on both APIs.
405 Method Not Allowed
Use POST for this endpoint. You called an inference endpoint with a method other than POST, for example GET /v1/chat/completions. The OpenAI-format type is method_not_allowed.
413 Payload Too Large
request body exceeds 32 MiB. The request body limit is 32 MiB. Large base64 images are the usual cause; send an image URL instead. See vision.
429 Too Many Requests
| Message | Retry-After |
|---|---|
Rate limit reached: the <plan> plan allows N requests per minute. Upgrade at https://abliterator.ai/pricing for more. |
10 |
Too many requests in flight: the <plan> plan allows N at once. Wait for one to finish or upgrade at https://abliterator.ai/pricing. |
2 |
See rate limits for backoff code.
500 Internal Server Error
Internal error. Something failed inside Abliterator. Retry once; if it persists, check /status.
502 Bad Gateway
| Message | Cause |
|---|---|
The model's providers are unavailable right now (N attempt(s)). Please retry shortly. |
Every serving endpoint for the model failed before sending a response |
The provider's response was interrupted. |
A non-streaming response broke off while Abliterator was reading it |
When the serving endpoint returns a server error or its own rate limit, Abliterator tries the model's other endpoints and returns 502 if none succeed. Each model has one serving endpoint today, so a 502 usually means one failed attempt. Retry with backoff and check /status.
Errors during a stream
Once a stream has started, the HTTP status is already 200. If the model's connection breaks mid-stream, the stream ends without the final usage chunk and data: [DONE] (OpenAI format) or without message_stop (Anthropic format). Treat a stream that ends without them as failed. You are billed for the tokens that were generated; see streaming.
What to retry
| Status | Retry? | What to do |
|---|---|---|
| 400 | No | Fix the request. Read the message: it usually names the parameter |
| 401 | No | Fix the key or the headers |
| 402 | No | Add credit at /account, lower max_tokens, or raise the key's limit |
| 403 | No | Use a different key or model |
| 404 | No | Fix the model ID or the path |
| 405 | No | Use POST |
| 413 | No | Shrink the request |
| 429 | Yes | Wait Retry-After seconds: 10 for the per-minute limit, 2 for too many in flight |
| 500 | Once | Then check /status |
| 502 | Yes | Exponential backoff with jitter |
Which errors are billed
None of them. Requests rejected by Abliterator (401, 402, 403, 404, 413, 429) never reach the model. Requests the model rejects as invalid and requests that fail with 502 are recorded with zero cost. The only partial charge is a stream that breaks after the model started generating: you pay for the tokens produced.
Frequently asked questions
Am I charged for failed requests?
No. Requests rejected by Abliterator, rejected by the model as invalid, or failed with a 502 cost nothing. You pay only for responses the model produced.