Skip to content

Errors

All error responses use a consistent shape:

{
"error": {
"message": "Invalid API key",
"type": "auth_error"
}
}

Some errors — most notably wrong endpoint × model mismatches — include an optional details object. Existing integrations keep working off error.message and error.type; the details object is a backward-compatible addition.

{
"error": {
"message": "The model \"google/gemini-3.1-flash-image\" does not support /v1/images/edits. Use /v1/images/generations instead. For image-to-image, try-on or image merging, send reference images via the 'file_ids' field (after uploading them through /v1/files), or via 'image_urls' for hosted URLs.",
"type": "unsupported_operation",
"details": {
"param": "model",
"model": "google/gemini-3.1-flash-image",
"attempted_endpoint": "/v1/images/edits",
"supported_endpoints": ["/v1/images/generations"],
"suggested_endpoint": "/v1/images/generations",
"hint": "For image-to-image, try-on or image merging, send reference images via the 'file_ids' field (after uploading them through /v1/files), or via 'image_urls' for hosted URLs.",
"docs_url": "https://llmtr.com/docs/gateway/image-generation/"
}
}
}

Fields inside details:

Field Description
param The offending request field (usually model)
model Canonical model ID from the request
attempted_endpoint Endpoint the request was sent to
supported_endpoints Endpoints this model actually supports
suggested_endpoint Closest correct endpoint to retry against
hint Provider- and model-specific actionable note (e.g. use file_ids)
docs_url Documentation pointer for the relevant guide

Retired model identifiers return HTTP 410. Some retirements include replacement_model and, when relevant, replacement_endpoint:

{
"error": {
"message": "Model \"openai/o3-pro-2025-06-10\" was retired on 2026-12-10. Use \"openai/gpt-5.5-pro\" on /v1/responses instead.",
"type": "model_retired",
"details": {
"model": "openai/o3-pro-2025-06-10",
"replacement_model": "openai/gpt-5.5-pro",
"retirement_date": "2026-12-10",
"replacement_endpoint": "/v1/responses"
}
}
}

For MiMo V2 legacy identifiers, the replacement uses the same chat endpoint:

{
"error": {
"message": "Model \"mimo/mimo-v2-flash\" was retired on 2026-06-30. Use \"mimo/mimo-v2.6-flash\" instead.",
"type": "model_retired",
"details": {
"model": "mimo/mimo-v2-flash",
"replacement_model": "mimo/mimo-v2.6-flash",
"retirement_date": "2026-06-30"
}
}
}

When no replacement is provided, LLMTR does not automatically forward the request:

{
"error": {
"message": "Model \"google/imagen-4.0-fast-generate-001\" was retired on 2026-08-17. This identifier is no longer accepted by LLMTR. Choose an active Google image model explicitly.",
"type": "model_retired",
"details": {
"model": "google/imagen-4.0-fast-generate-001",
"retirement_date": "2026-08-17",
"status": "retired"
}
}
}
HTTP type Reason What to do
400 invalid_request_error Invalid JSON, missing field, unknown parameter Fix the request and check the schema
401 auth_error Invalid or revoked key Generate a new key in the dashboard
402 insufficient_credits Credit balance does not cover this request's reservation Top up from Dashboard > Billing or send a lower max_tokens
402 insufficient_credits details.reason: "top_up_required": this free model is open only to accounts that have topped up at least once Top up once from Dashboard > Billing (minimum $5) and retry after a minute; the model is not charged to your balance
402 insufficient_credits details.reason: "top_up_required", POST /v1/files: file uploads are open only to accounts that have topped up at least once Top up once from Dashboard > Billing (minimum $5) and retry after a minute
402 insufficient_credits details.reason: "account_verification_required": this free model needs the account to be verified once Top up once from Dashboard > Billing (minimum $5) and retry after a minute; the model is not charged to your balance. When the answer has details.topUpUrl, that is the top-up page
402 insufficient_credits details.reason: "trial_request_too_large": the request is larger than what is left of the free trial on this model Send a shorter request, or top up once from Dashboard > Billing (minimum $5); the model is not charged to your balance
402 insufficient_quota details.reason: "free_spend_user_cap_reached": your account's allowance for this free model is used up for this period Use another model; this allowance does not reset before the period ends
402 spending_limit_exceeded The API key's spending limit is reached or does not cover this request Raise the key's limit or send a lower max_tokens
403 model_not_allowed The key's model scope does not include this model Edit the scope or call a model inside it
403 permission_error The key is not permitted for this request, for example its IP restriction does not include this network Read error.message; for an IP restriction, add your egress address to the key's IP list
403 forbidden The model is not available for this account Verify model access
403 account_banned The account has been suspended Rotating the key does not help; contact info@llmtr.com
403 automated_gateway_not_allowed The request is not accepted in this form Use the key from your own application with a real model; if you have trouble, contact info@knowhy.co
403 feedback_required This free model asks once for short feedback after an account has used it for a while Fill in the form at details.feedbackUrl, or send the same answers to POST /v1/feedback; your use continues as soon as they are in
403 feedback_not_requested POST /v1/feedback: this model has not asked you for feedback yet Keep using the model; when feedback is needed, a request says so with feedback_required
404 model_not_found Unknown model value Check the canonical ID (provider/model)
410 model_retired Model identifier has been retired Use replacement_model when present; otherwise explicitly choose an active catalog model
413 request_too_large Context window exceeded Shorten the messages content
413 payload_too_large The request body is larger than accepted Send a smaller request; split a large batch into several requests
429 rate_limit_error Rate limit hit Retry with exponential backoff
429 rate_limit_error (details.reason: "free_access_paused") Free models are temporarily paused for this key. Paid models still work Retry after Retry-After, or use a paid model; if you have trouble, contact info@knowhy.co
429 rate_limit_error (details.reason: "unpaid_account_limit") Too many requests in a short time from an account that has not added credit Retry after Retry-After; adding credit to the account lifts the limit shortly after
500 internal_error Gateway internal error Retry after a short delay
502 provider_error Provider-side failure Often transient, retry
503 provider_unavailable Provider unreachable Retry later
503 provider_overloaded The model provider rejected the request because it is temporarily overloaded; independent of LLMTR Wait for Retry-After, then retry
503 model_busy The model is handling as many requests at once as it takes; the request was not sent to it and did not count against your free allowance Wait for Retry-After, then retry
504 timeout Request timed out Request fewer tokens or try streaming

Some free models ask once for short feedback after an account has used them for a while. The request at that point returns 403 feedback_required, and details.feedbackUrl points to the form in the dashboard. Your use continues as soon as the answers are in; the same model does not ask again.

You can also send the same answers with your API key. This request does not reach the model and is not charged. Answers are accepted once your account's use of the model has reached the point where feedback is asked for; before that the request returns 403 feedback_not_requested:

Terminal window
curl https://llmtr.com/v1/feedback \
-H "Authorization: Bearer $LLMTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax/minimax-m3.1-flash-free",
"use_cases": ["coding_agent"],
"tools": ["claude_code"],
"performance": "sufficient",
"issues": ["latency"],
"comment": "Worked well on long refactors; the first token is a little slow.",
"would_pay": "if_price_fits"
}'
Field Values
model The id of the model that asks for feedback
use_cases At least one of: coding_agent, code_chat, tool_automation, long_documents, vision_video, writing, chat_assistant, other
tools At least one of: claude_code, cursor, cline_roo, kilo_code, own_app, llmtr_chat, other
performance above_expectations, sufficient, partial, insufficient
issues At least one of: tool_calling, long_context, latency, language_quality, instruction_following, overthinking, vision_video, none
previous_model Optional, up to 120 characters
comment 20-2000 characters
would_pay yes, if_price_fits, no

Response:

{ "object": "feedback", "id": "fb_3f1c9a0e7d2b4c6a81", "model": "minimax/minimax-m3.1-flash-free", "status": "received" }

A second submission for the same model returns status: "already_received" and does not change the first answers. The answers may be shared with the model's provider together with the ids of the requests you sent to that model, without your e-mail address or account details; request and answer content is not stored. Do not include personal or confidential information in the free text.

When an account is suspended, every API key belonging to it returns 403:

{
"error": {
"message": "This account has been suspended. Contact info@llmtr.com if you believe this is a mistake.",
"type": "account_banned"
}
}

Do not confuse this with 401 auth_error. A 401 says the key itself is invalid and generating a new one fixes it; account_banned says the key is valid but the account is not permitted — generating a new key changes nothing.

It is not a retriable error: trying again returns the same response. Treat this type as permanent on the client side and keep it out of your backoff loop.

On the /v1/messages (Anthropic-compatible) surface the same condition is returned in Anthropic's own envelope with type permission_error.

Retry only for 429, 500, 502, 503, 504.
Backoff: exponential + jitter.
Max retry: 3.

Example (Python):

import time, random
from openai import OpenAI, APIStatusError
RETRIABLE = {429, 500, 502, 503, 504}
def call(client, payload, attempt=0):
try:
return client.chat.completions.create(**payload)
except APIStatusError as e:
if e.status_code in RETRIABLE and attempt < 3:
time.sleep(2 ** attempt + random.random())
return call(client, payload, attempt + 1)
raise

When implementing retries, also account for client-side timeouts, broken connections, and duplicate sends.