LLM rate limit

Also known as: token rate limit · tokens per minute · TPM limit

On this page 7

An LLM rate limit is a quota that caps how many requests and tokens a client may send to a large language model service within a fixed time window, usually expressed as requests per minute (RPM) and tokens per minute (TPM). In AI infrastructure, rate limits protect finite GPU capacity, keep latency predictable for all tenants and enforce commercial tiers.

Unlike classic web API limits, which count calls, LLM limits must also count work per call, because one request can consume ten tokens or two hundred thousand. For that reason the token rate limit is usually the binding constraint in production, and engineers plan capacity around it rather than around request counts alone.

What an LLM rate limit measures

Providers combine several independent dimensions, and a request is rejected as soon as any one of them is exhausted. Limits are typically scoped to an organization, a project or an API key, and often separately for each model.

The table below summarizes the dimensions most often enforced and what they protect.

DimensionWhat is countedWhat it protects
Requests per minuteIndividual API callsRequest handling and scheduling overhead
Tokens per minuteInput plus estimated or actual output tokensGPU compute and memory bandwidth
Input and output token limitsPrompt tokens and generated tokens separatelyPrefill and decode capacity, which cost differently
Tokens or requests per dayTotals over 24 hoursBudget and abuse prevention
Concurrent requestsRequests in flight at the same timeKV cache memory and batch slots
Common rate limit dimensions

Many providers count the requested maximum output tokens against the TPM budget when the request arrives, then reconcile with actual usage later. Setting a needlessly high output ceiling therefore consumes quota that is never used and causes rejections earlier than expected.

How providers enforce rate limits

Enforcement usually relies on a token bucket or a sliding window algorithm. A token bucket refills at a steady rate and allows short bursts up to its capacity, while a sliding window counts usage over the trailing interval and smooths out boundary effects of fixed windows.

When a limit is exceeded, the API returns HTTP status 429 Too Many Requests, often with response headers that report remaining requests, remaining tokens and the time until reset. A separate overloaded or 503-style error indicates that the provider as a whole lacks capacity, which is a different condition from the client exceeding its own quota.

AlgorithmBurst behaviorTypical use
Fixed windowAllows double bursts at window edgesSimple daily quotas
Sliding windowSmooth, no edge burstsPer-minute request and token limits
Token bucketBursts up to bucket size, then steady rateMost per-minute API limits
Concurrency semaphoreHard cap on parallel requestsLong-running streaming generations
Enforcement algorithms compared

Rate limits, tiers and provisioned throughput

Shared endpoints assign limits through usage tiers that rise with account history and spending. These limits describe a maximum allowance, not a guarantee: during peak demand, a provider may still return capacity errors to a client that is under its quota.

Teams that need predictable capacity move to provisioned throughput, which reserves dedicated model capacity measured in units of tokens per minute, or to self-hosted inference where the limit becomes the physical throughput of their own GPU cluster.

OptionCapacity guaranteeMain trade-off
Shared pay-per-token tierNone beyond the quotaCheap and flexible, but variable under load
Batch APIHigh volume within hoursLower price, no real-time responses
Provisioned throughputReserved tokens per minutePaid whether used or not
Self-hosted servingLimited by own hardwareFull control, full operational burden
Ways to obtain LLM capacity

Designing applications around rate limits

Robust clients treat rate limits as a normal operating condition, not as an error. The core pattern is retry with exponential backoff and jitter: wait a growing, randomized interval after each 429 response, and respect any retry-after value the server returns.

  • Client-side throttling estimates tokens before sending and queues requests that would exceed the budget.
  • Prompt caching reduces repeated input processing, and on some platforms cached tokens count less toward limits.
  • Semantic caching answers repeated questions without calling the model at all.
  • Model routing and fallback send overflow traffic to a smaller model or another provider through an AI gateway.
  • Batching offline work moves non-urgent jobs to batch endpoints with separate quotas.

Capacity planning should start from peak tokens per minute, not average traffic. A useful estimate multiplies peak requests per minute by the average prompt length plus the requested output ceiling, then adds a safety margin of roughly 20 to 50 percent for bursts and retries.

Common mistakes with LLM rate limits

Most production incidents involving rate limits come from a small set of predictable design errors. The following table lists them with their typical fixes.

MistakeConsequenceFix
Immediate retries without delayRetry storms that extend the outageExponential backoff with jitter
Oversized output ceilingsTPM budget exhausted by reserved tokensSet realistic maximum output lengths
One key for all workloadsBatch jobs starve interactive usersSeparate keys or projects per workload
Ignoring rate limit headersBlind throttling and wasted callsRead remaining-token headers and adapt
Planning from averagesFailures at daily peaksSize capacity for peak demand
Frequent errors and their remedies

Agentic systems deserve special attention, because one user action can trigger dozens of chained model calls. Without a per-task token budget, a single runaway agent loop can consume an entire organization’s quota within minutes.

Understanding it simply

Think of a busy restaurant kitchen. It can cook only so many meals per minute. To keep things fair, each table may order only a set amount at once.

An LLM rate limit works the same way. The AI service has limited computing power. It lets each customer send only so many words per minute. If a customer asks for too much, the service says “please wait” and the program tries again later. Good software expects this pause and handles it calmly.

Applied in practice

A legal technology company runs a contract review tool on a hosted model with a limit of 2 million tokens per minute. Each review sends about 12,000 input tokens and requests up to 4,000 output tokens. At the Monday morning peak of 150 reviews per minute, demand reaches about 2.4 million tokens per minute, and users begin to see failed requests.

The engineering team first adds exponential backoff with jitter so that rejected calls retry smoothly instead of all at once. Next, it lowers the output ceiling to 1,500 tokens, which matches real usage, and enables prompt caching for the standard clause library shared by most contracts. Overnight bulk analyses move to a batch endpoint with its own quota.

After these changes, peak demand falls to roughly 1.3 million tokens per minute, leaving a comfortable margin. Interactive reviews complete without visible errors, and the company postpones a costly upgrade to provisioned throughput.