# Rate limits

Limits are set per plan and apply to the **account**, across all of its API keys.

## Limits by plan

This table is read live from the plan settings the API enforces. **No limit** means the plan has no request, token or concurrency cap.

| Plan | Requests / min | Tokens / min | Concurrent requests | Max context | API keys |
| --- | --- | --- | --- | --- | --- |
| Pay as you go | No limit | No limit | No limit | 1M | 5 |
| Starter | No limit | No limit | No limit | 1M | 5 |
| Pro | No limit | No limit | No limit | 1M | 20 |
| Power | No limit | No limit | No limit | 1M | 50 |
| Business | No limit | No limit | No limit | 1M | 200 |

Current values for your account are returned by `GET /v1/account` and shown on the [Usage](https://claudech.com/usage) page. Individual models may carry lower limits during capacity incidents; the effective limit is always the lower of the two.

**Tokens per minute** counts the estimated prompt size plus the expected output (up to 4,096 tokens) at the time the request starts, so a burst of long prompts can hit the token limit well before the request limit.

**Max context** is 1 million tokens on every plan, the same window each model publishes. A request above that fails with `context_length_exceeded` before it is billed.

## Reading the headers

Every chat completion response includes the current state of your request and token windows:

```http
x-ratelimit-limit-requests: 300
x-ratelimit-remaining-requests: 287
x-ratelimit-limit-tokens: 1000000
x-ratelimit-remaining-tokens: 942115
x-ratelimit-reset-requests: 41s
x-request-id: req_01J9X3Q5K7M2N8P4R6T0V2W4Y6
```

When a limit is exceeded the response is `429` with a `retry-after` header (in seconds) and one of these codes:

| `code` | Trigger | Typical `retry-after` |
| --- | --- | --- |
| `rate_limit_exceeded` | Requests per minute | Seconds until the window resets |
| `tokens_per_minute_exceeded` | Tokens per minute | Seconds until the window resets |
| `concurrency_limit_exceeded` | In-flight requests | `2` |
| `daily_limit_exceeded` | Plan's daily token cap (if any) | Seconds until UTC midnight |
| `monthly_limit_exceeded` | Plan's monthly token cap (if any) | Seconds until UTC midnight |

```json
{
  "error": {
    "message": "Rate limit reached: 300 requests per minute. Retry in 41s.",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "request_id": "req_01J9X3Q5K7M2N8P4R6T0V2W4Y6"
  }
}
```

Rate-limited requests are **never billed**.

## Rate limits in Claude Code

[Claude Code on Claudech](https://claudech.com/docs/integrations/claude-code) follows your Claudech plan's limits in the table above. It does not use the usage windows of a Claude subscription: every request is paid from your Claudech token balance.

- **One turn is one request.** Background tasks on `ANTHROPIC_SMALL_FAST_MODEL` and sub-agents can run alongside it, so a session often has several requests in flight at once.
- **Long sessions send large prompts.** The whole conversation is resent on every turn. On a plan with a tokens-per-minute limit, each request counts its full prompt size, so a long context fills the window quickly. The repeated part is billed at the cheaper cached-input rate.
- **A `429` is usually retried for you.** Claude Code waits and tries again; if a request keeps failing, the Claudech error code in the message tells you which limit was hit (see the table of codes above).
- **An empty balance is not a rate limit.** It returns `402 insufficient_balance`. Top up under [Billing](https://claudech.com/billing) and the session continues.

## Other limits

| Limit | Value |
| --- | --- |
| Request body size | 2 MB |
| Messages per request | 200 |
| Text content per message | 1,000,000 characters |
| Tools per request | 128 |
| API key creation | 20 per hour |

## Staying under the limits

> **Use the SDK's built-in retries**
>
> The official OpenAI SDKs retry `429` and `5xx` responses with exponential back-off and honour `retry-after` automatically. Set `maxRetries` (JavaScript) or `max_retries` (Python) to tune it.

- **Respect `retry-after`.** Retrying sooner just consumes more of the window.
- **Use a client-side semaphore** equal to your plan's concurrency limit. Excess parallelism turns into `concurrency_limit_exceeded` and wasted round trips.
- **Stream long responses.** Streaming does not change the limits but lets you show progress instead of waiting.
- **Keep prompts tight.** Fewer prompt tokens means more requests per token window and a lower bill.
- **Watch `x-ratelimit-remaining-*`** and pre-emptively slow down when they approach zero rather than waiting for a `429`.

If you consistently need more headroom, upgrade your plan from [Billing](https://claudech.com/billing). Limits apply immediately after the plan changes.

---

Source: https://claudech.com/docs/rate-limits
