Rate limit

A rate limit caps how many requests, or how many tokens, a customer can send to an AI service in a set period, and requests over the cap are rejected until capacity frees up.

Rate limits are as old as web services. The status code that signals one, 429 Too Many Requests, was standardised by the IETF in RFC 6585 in April 2012, which says the response may include a Retry-After header telling the client how long to wait. AI providers use the same mechanism, but they count more than requests, because one request to a language model can need far more computation than another.

OpenAI's documentation lists requests per minute, requests per day, tokens per minute, tokens per day and images per minute, plus audio limits for some audio models, and a customer hits whichever limit comes first. Anthropic counts requests per minute, input tokens per minute and output tokens per minute for each model. Limits apply to an organisation or project, not to an individual user, and rise automatically through usage tiers as a customer's spending history grows.

How the counting works matters. Anthropic's API uses the token bucket algorithm, in which capacity refills continuously up to a maximum rather than resetting at the top of each minute. A limit of 60 requests per minute may therefore be enforced as one per second, and a burst of requests can trip it even when the minute's total is within bounds. Anthropic also counts only uncached input tokens towards its input limit, so a well-cached application can process several times its nominal limit.

The standard way to cope is exponential backoff: wait after a rejected request, wait longer after each further rejection, and add a random delay so that many clients do not retry at the same instant. OpenAI's guide warns that failed requests still count towards per-minute limits, so retrying in a tight loop only makes things worse. Rate limits are distinct from spend limits, which cap money rather than speed, though both can return a 429 error.

Providers say limits exist to prevent abuse, share capacity fairly and manage load on their hardware. For businesses building on AI, rate limits are a real constraint on launch plans: an application that works for ten testers can fail on its first busy day, and higher limits often have to be requested in advance. Anthropic also applies ramp limits, which cap how fast an organisation's usage can grow, so a sudden surge can be rejected below the stated limits.

Common questions

What does a 429 error mean in an AI API?

HTTP 429 means Too Many Requests: the client has exceeded a rate limit. AI providers return it when an organisation goes over its allowed requests or tokens per minute, and sometimes when a monthly spend cap is reached. The response often includes a Retry-After header saying how long to wait.

What are RPM and TPM?

RPM is requests per minute and TPM is tokens per minute, the two most common ways AI providers measure rate limits. Anthropic splits tokens into input tokens per minute and output tokens per minute. Whichever limit is reached first triggers the rejection.

How do I avoid hitting rate limits?

Retry with exponential backoff and random jitter, respect the Retry-After header, and spread bulk work evenly rather than sending it in bursts. Caching repeated prompt content, using batch processing for work that is not urgent, and requesting a higher tier before launch also help.

Why do AI companies impose rate limits?

The providers say limits guard against abuse, stop one customer slowing the service for everyone and keep total load within what their hardware can serve. Limits also protect customers from runaway spending caused by a bug that sends requests in a loop.

Finding more

Search for a provider's name with "rate limits" to find its current tiers and numbers, which change often and differ by model. The providers' API documentation is the authority, and the IETF's RFC 6585 defines the 429 status code itself. Developer forums are useful for practical workarounds, but check any quoted figures against the official pages.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.