# Limits and error codes — neuraldeep.tech API

> One section of the machine-readable reference. All sections: https://neuraldeep.tech/llms.txt · everything in one file: https://neuraldeep.tech/llms-full.txt

Base URL: `https://api.neuraldeep.tech/v1`
Auth: `Authorization: Bearer $YOUR_KEY`

Chat models have four limits at once: `session` (3-hour UTC window), `week` (ISO week), concurrency (requests in flight at the same time) and requests per minute. Any of them yields `429`; retry according to the specific reason. The higher the plan, the wider all four. A key sees its own remainders in [`GET /v1/limits`](https://neuraldeep.tech/docs/limits-api.md); the general error table is in [getting started](https://neuraldeep.tech/docs/start.md).

> For an agent 429, check which window fired. Start with [client setup](https://neuraldeep.tech/docs/agents.md), then use the [settings builder](https://neuraldeep.tech/docs/agent-config.md) and your profile notes. There is no universal concurrency field for every client.

Headers on our 429s:

- `X-Window`: which window fired (`session`, `week`, `chat_rpm`, `account-rpm`, `account-inflight`, `key-rpm`, `daily-capacity`, `abuse` and others, the full list is in [getting started](https://neuraldeep.tech/docs/start.md));
- `X-Tier`: the key's plan;
- `Retry-After` and `Retry-After-Ms`: when you can retry.

**Free plan input cap.** On the Free plan a single chat request is capped at **46,112 input tokens**, counting both messages and tool schemas. This is a plan cap, not a model property: the catalog shows the model window (262,144 for qwen3.6-35b-a3b). A longer request gets a 400:

```json
{"error": {"message": "Слишком длинный запрос: 52000 токенов входа при пределе 46112 на бесплатном тарифе. Считаются и сообщения, и схемы инструментов... (maximum context length is 46112 tokens)", "code": "400"}}
```

(The message is in Russian: "Request too long: N input tokens over the 46112 limit on the Free plan"; the English tail lets agents detect context overflow.) Your key's effective window is in `GET /v1/models`: `limit.context` already accounts for the plan. When the plan cuts the window, `limit.context_model` (the full model window) and `limit.context_reason: "tier"` sit next to it. An agent should take the number from here, not from the model table.

```bash
curl -s https://api.neuraldeep.tech/v1/models -H "Authorization: Bearer $YOUR_KEY" \
  | jq '.data[] | select(.id=="qwen3.6-35b-a3b") | .limit'
```

The cap applies only to a key in Plan mode. A key in Wallet mode and any paid plan get the model's full window. A common trap: the wallet is topped up, but the key is still in Plan mode and keeps living by Free rules. The mode is switched per key on the [API keys](https://hub.neuraldeep.tech/app/keys) page.

Example 429 bodies:

```json
// X-Window: session, the 3-hour limit is used up
{"error": {"message": "Your plan's 3-hour request limit is used up. Paused until 15:00 UTC. Reset the limit now: https://hub.neuraldeep.tech/app/resets; for more volume, a higher plan (https://neuraldeep.ru/en/pricing) or switch the key to Wallet mode (https://hub.neuraldeep.tech/app/keys). Limit resets at: 2026-10-22 15:00:00 UTC", "code": "429"}}

// X-Window: week
{"error": {"message": "Your plan's weekly request limit is used up, it resets on Monday 00:00 UTC. Reset the limit now: ... Limit resets at: 2026-10-26 00:00:00 UTC", "code": "429"}}

// X-Window: chat_rpm, more requests per minute than the plan allows
{"error": {"message": "Too many requests per minute (plan limit N). Retry in 58 s. Limit resets at: ...", "code": "429"}}

// X-Window: key-rpm (key-tpm, key-parallel), the key's own limit
{"error": {"message": "Key request limit per minute exceeded. Retry in 12 s. Limit resets at: ...", "code": "429"}}

// X-Window: daily-capacity
{"error": {"message": "The key's daily capacity is used up, it resets at 00:00 UTC. For more volume, a higher plan (...) or switch the key to Wallet mode (...). Limit resets at: ...", "code": "429"}}

// X-Window: abuse, the client kept hammering after a refusal
{"error": {"message": "Requests from this account are paused for 60 min: the client retried many times in a row after being refused by a limit. Wait as long as the Retry-After header says before retrying. Limit resets at: ...", "code": "429"}}
```

To avoid the pause for repeated retries, retry only after `Retry-After`. Texts come in the key owner's dashboard language (or by `Accept-Language`); the `Limit resets at:` tail is always the same.

Model gateway response codes:

- 200: ok;
- 400: input longer than the model window or the Free cap, invalid request body;
- 401: the key is invalid or revoked, the model is not on the key;
- 402: the wallet is empty and the model is billed per token (`X-Wallet: empty`). Plan models keep working;
- 403: the model is not in your plan (`X-Window: free-model`);
- 429: a limit, read `X-Window` and `Retry-After`. The free transcription quota is here too (`X-Window: stt-free-daily`);
- 502 and 503: the model is temporarily unavailable, retry in a few seconds. If the model is overloaded at the provider, you get `503` with "The model is temporarily overloaded at the provider. Retry in a minute or pick another model.";
- 504: the model did not answer in time, retry or shorten the request.
