> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gnani.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Limits

> Context size, reply length, request rates and the daily token quota for the LLM API.

Early access
**Gnani Evon v3.5** is now available as an API to early access registrants.

## What a token is

The model reads and writes text in **tokens**, pieces of words. In English a token is about four characters, or three-quarters of a word. Text in Indian scripts can take more tokens than English for the same meaning. Every response reports the exact count in `usage`.

***

## Context window by plan

The context window is the input and the output of one request together.

| Plan | Context window |
| - | - |
| Free | **64K tokens** (65,536) |
| Pay-as-you-go | **64K tokens** (65,536) |
| Enterprise | **128K tokens** (131,072) |

A request over the context window is refused with `400 context_length_exceeded`.

***

## Free and Pay-as-you-go plans

| Limit | Value | When it is exceeded |
| - | - | - |
| Context window (input and output together) | **64K tokens** (65,536) | `400 context_length_exceeded` |
| Input per request | **62K tokens** (63,488) | `400 context_length_exceeded` |
| Output per request (`max_tokens`) | **1,024 tokens**, thinking included | `400 invalid_request` |
| Requests per second | **1**, with bursts of up to **2** | `429 RATE_LIMITED` |
| Requests per minute | **60** | `429 RATE_LIMITED` |
| Requests running at the same time | **1** | `429 RATE_LIMITED` |
| Tokens per day (input and output together) | **100,000**, reset at midnight IST | `429` `DAILY_TOKEN_QUOTA_EXCEEDED` / `daily_token_quota_exceeded` |
| [Web searches](https://docs.gnani.ai/api/LLM/web-search.md) per day | **10**, reset at midnight IST | `429 web_search_limit_exceeded` |

There is no tokens-per-minute limit.

Enterprise plans have a 128K-token context window. If your account belongs to an organisation, your organisation has its own limits. Contact support to find out what they are or to change them.

***

## How the limits work

### Context window and input

The context window is everything the model handles for one request: the whole conversation you send, plus the reply it may write. A request is refused before the model runs when:

* the input is over the input limit for your plan (62K tokens on Free and Pay-as-you-go), or
* the input plus `max_tokens` is over your plan's context window (64K tokens on Free and Pay-as-you-go, 128K on Enterprise).

The input is estimated from the size of the request body (about 4 bytes per token) before the model runs, so a request close to the limit can be refused even if its exact count would fit. The error message gives the estimate:

```json theme={null}
{
  "error": {
    "message": "The input (about 64800 tokens) plus up to 1024 output tokens is more than the 65536-token context; shorten the input or lower max_tokens.",
    "type": "invalid_request_error",
    "param": null,
    "code": "context_length_exceeded"
  }
}
```

> [!TIP]
>
> **In long conversations**, drop or summarise the oldest messages before the conversation reaches the limit. Keep the `system` message.

### Reply length

A request without `max_tokens` can use up to 1,024 output tokens. Asking for more is refused:

```json theme={null}
{
  "error": {
    "message": "max_tokens is 2048; the maximum for your plan is 1024.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
```

[Thinking](https://docs.gnani.ai/api/LLM/thinking.md) counts toward this limit. If replies come back empty with `finish_reason: "length"`, turn thinking off with `"reasoning_effort": "none"`.

### Request rate and concurrency

You can send one request per second, with short bursts of two, up to 60 a minute, and one request can run at a time. Wait for each reply, streamed or not, to finish before you send the next request. Requests that come too fast are refused by the API gateway:

```json theme={null}
{"detail": {"error_code": "RATE_LIMITED", "message": "Request rate exceeded: at most 1 request per second (burst of 2).", "status_code": 429}}
```

Wait, then retry with backoff. When the response has a `Retry-After` header, wait at least that many seconds. OpenAI's SDKs do this for you.

### Daily token quota

Every request's `usage.total_tokens` (input plus output, thinking included) counts toward 100,000 tokens a day. The count resets at midnight IST. Once it is used up, every request is refused until then, and `Retry-After` gives the seconds until the reset:

```json theme={null}
{
  "error": {
    "message": "Daily token quota of 100000 tokens used up. It resets at midnight IST.",
    "type": "rate_limit_error",
    "param": null,
    "code": "daily_token_quota_exceeded"
  }
}
```

Because each request carries the whole conversation, long chats use the quota faster with every turn.

### Estimate the size of a request

Paste text to see how the pre-check above would size it. This is an estimate from the request body size, not the model's exact token count.

***

## Ways to use fewer tokens

* **Turn thinking off** for simple tasks (`"reasoning_effort": "none"`). Thinking is often the largest part of the output.
* **Trim the conversation.** Send only the turns the model needs.
* **Keep the `system` message short.** It is sent, and counted, with every request.
* **Set `max_tokens`** to the length you need.
* **Use web search only when needed.** The search results are added to the input.

***

## Other limits

| Limit | Value |
| - | - |
| Request body size | 10 MB |
| User and tool text that can be screened by the [safety filters](https://docs.gnani.ai/api/LLM/safety.md) | 1 MB |
| Stop sequences | 4 |
| Replies per request (`n`) | 1 |

***

## Related

> [card] [Errors](https://docs.gnani.ai/api/LLM/errors.md)
>
> Error codes, and how to retry with backoff.

> [card] [Thinking](https://docs.gnani.ai/api/LLM/thinking.md)
>
> Thinking counts toward `max_tokens` and the quota.

> [card] [Web search](https://docs.gnani.ai/api/LLM/web-search.md)
>
> Daily searches and how they use tokens.

> [card] [Safety and privacy](https://docs.gnani.ai/api/LLM/safety.md)
>
> The 1 MB of text that can be screened.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.