No KYC — no ID, no selfie, no documents. Pay in crypto: BTC, USDT, USDC, ETH, SOL, LTC
Language: English
Get an API key

Docs · errors

Errors, rate limits and retries

Errors come back in the OpenAI format, so SDKs raise them as usual exceptions. This page lists every status and code, says which ones are worth a retry, and shows a retry loop that respects the rate limit.

Last updated: · 4 min read

Quick answer

Which errors can the LLMwithCrypto API return, and are they charged?

The API answers errors with an HTTP status and an OpenAI-style body: {"error": {"message", "type", "param", "code"}}. LLMwithCrypto uses 400 for a bad request, 401 for a wrong key, 402 when the credit cannot pay, 404 for an unknown model, 429 for the rate limit and 500 or 503 on our side. A call that ends in an error costs nothing, as documented on 23 October 2026.

Which errors exist?

No error uses credit. code is the stable value to test in your code; message is for people and may change.

HTTPcodeCauseRetry?
400invalid_parameterA required field is missing, or a value is out of range or of the wrong typeNo: fix the request
400context_length_exceededThe messages plus max_tokens do not fit in the model’s context windowNo: shorten the input or lower max_tokens
400unsupported_parameterA field this model does not support, such as response_format on a model without JSON modeNo: remove it or change model
401invalid_api_keyThe key is missing, mistyped or revokedNo: check the key
402insufficient_balanceThe credit left cannot pay for this callNo: buy a credit pack
404model_not_foundThe model id is not on our listNo: use an id from GET /api/v1/models
429rate_limit_exceededMore requests or tokens per minute than the account allowsYes, after a pause
500server_errorSomething failed on our sideYes, with backoff
503model_overloadedThe model is at capacity for a momentYes, with backoff, or try another model
Error body: an unknown model
{
  "error": {
    "message": "The model `gpt-4o` does not exist or is not available to your key.",
    "type": "invalid_request_error",
    "param": "model",
    "code": "model_not_found"
  }
}

Why do I get 404 for gpt-4o or claude?

Because those models are not sold here. We do not sell access to GPT, Claude, Gemini or Grok: their makers forbid reselling API access without their approval, and we do not have it. Code written for the OpenAI API often names a model in several places; search your project for the old name and replace it with an id from the models page, such as deepseek-v4-pro or gpt-oss-120b.

When should my code retry?

Retry 429, 500 and 503, and network errors such as a timeout or a reset connection. Never retry 400, 401, 402 or 404: the same request will fail the same way.

Wait before each new attempt. When the response has a Retry-After header, wait that many seconds; otherwise double the pause each time (1, 2, 4, 8 seconds…) and add a little random time, so that many workers do not retry in step. Give up after a few attempts and log the error. The OpenAI SDKs already retry on their own; the example below turns that off to show the logic in full.

Python: retry 429, 500 and 503 with exponential backoff
import os
import random
import time

from openai import APIConnectionError, APIStatusError, OpenAI

client = OpenAI(
    base_url="https://llmwithcrypto.com/api/v1",
    api_key=os.environ["LLMWITHCRYPTO_API_KEY"],
    max_retries=0,
)
RETRY = {429, 500, 503}


def chat(messages, model="deepseek-v4-pro", attempts=5):
    for attempt in range(attempts):
        try:
            return client.chat.completions.create(model=model, messages=messages, max_tokens=500)
        except APIStatusError as err:
            if err.status_code not in RETRY or attempt == attempts - 1:
                raise
            wait = err.response.headers.get("retry-after")
            delay = float(wait) if wait else min(30, 2**attempt) + random.random()
        except APIConnectionError:
            if attempt == attempts - 1:
                raise
            delay = min(30, 2**attempt) + random.random()
        time.sleep(delay)

What should I do on 402 insufficient_balance?

Top up. The call was not charged, and nothing else on the account changes: your keys keep working as soon as there is credit again. Once your crypto top-up is confirmed and a credit pack is bought, your API key is waiting in the dashboard.

To avoid surprises in production, read GET https://llmwithcrypto.com/api/v1/credits from time to time and alert yourself under a floor of your choice; the models and credits page shows the call. Credit has no expiry date: what you do not spend this month is still there next year, so a larger pack bought early costs nothing extra.

How do I stay under the rate limit?

Every account has a per-minute request and token limit, shown in the dashboard; ask support and it can be raised.

  • Limit concurrency. Run a fixed number of requests in parallel rather than firing a whole batch at once.
  • Cap the output. Token limits count what the model writes too, so a sensible max_tokens keeps more requests inside the limit.
  • Spread batches. For large offline jobs, pace the requests over the minute instead of sending them in bursts.

Errors: common questions

Am I charged for a failed call?

No. You pay per token from your balance: input and output tokens are counted by the model’s own tokenizer and charged at that model’s price per 1M tokens. A call that ends in an error costs nothing.

Where can I see if there is an outage?

On the status page. A run of 500 or 503 errors on several models usually means an incident on our side; write to [email protected] if it lasts.

Can I see the request that failed?

Not on our side. We do not store your prompts or the model’s answers: once a response is sent, its text is gone. Each call leaves one log line with the time, the account, the model and the token counts, deleted after 30 days. Log the error code and your own request id in your app.

DeepSeek V4 Pro from $1.254 per 1M input tokens · no KYC

Get an API key