
Dan Patiño
AI Strategy & Innovation at Coderhouse
Artificial Intelligence
LLM API rate limits are the caps a model provider places on how much traffic your application can send in a given window of time: how many requests, how many input tokens and how many output tokens per minute (and sometimes per day). When an application crosses one of those caps, the API stops answering normally and returns an HTTP 429 error instead.
For a prototype, a 429 is a minor annoyance. For an AI feature running inside a client’s business — a support agent, a document pipeline, an internal copilot used by hundreds of people — it is an outage. That is why handling rate limits is one of the first production skills a forward-deployed AI engineer needs: retries, backoff, queues and token budgets are the difference between a demo and a system a company can rely on.
What are LLM API rate limits?
Most providers measure several limits at the same time, and you can hit any of them first:
RPM (requests per minute): how many API calls you can make, regardless of size.
TPM (tokens per minute): how many tokens you can process. Some providers split this into input tokens per minute and output tokens per minute.
RPD / TPD (per day): daily caps that apply on some models and tiers.
Spend limits: monthly cost ceilings that behave like a hard stop once they are reached.
OpenAI’s rate limits guide gives a useful example of how these interact: if your RPM limit is 20, sending 20 tiny requests fills the limit even if you used only a fraction of your token allowance. OpenAI also notes that limits are set at the organization and project level, vary by model, and that some model families share a single limit.
Anthropic’s rate limits documentation describes a token bucket algorithm: capacity refills continuously up to your maximum instead of resetting at fixed intervals. It also warns that a limit like 60 RPM may be enforced as roughly one request per second, so short bursts can trigger errors even when your per-minute average looks safe.
Why rate limits matter in production AI apps
Rate limits rarely show up in testing because a single developer does not generate much traffic. They appear when real usage arrives:
A batch job processes thousands of documents at once and saturates TPM.
An AI agent calls the model in a loop (plan, call a tool, reflect, call again) and multiplies requests per user action.
Several features or clients share the same API project and compete for the same quota.
Traffic spikes after a launch or at the start of the business day.
The failure mode is not only an error message. Uncontrolled retries can make the situation worse: OpenAI points out that unsuccessful requests also count toward your per-minute limit, so resending a request in a tight loop just keeps you blocked.
How to read a 429 response
Before deciding what to do, engineers inspect what the API is telling them:
Rate limit headers. OpenAI returns headers such as x-ratelimit-remaining-requests, x-ratelimit-remaining-tokens and x-ratelimit-reset-tokens. Anthropic returns anthropic-ratelimit-* headers with remaining capacity and reset times.
The retry-after header. When present, it says how many seconds to wait before trying again. Both providers recommend honoring it.
The error type and message. A temporary rate limit is not the same as a quota or billing problem. Anthropic documents that when an organization hits its monthly spend cap, requests return 429 without a retry-after header, and retrying fails until access resumes. Those errors need a human decision, not an automatic retry.
Strategies AI engineers use to handle rate limits
1. Retry with exponential backoff and jitter
The standard pattern is to wait briefly after a failed request, then increase the delay after each new failure, adding a random “jitter” so many workers don’t retry at the same instant. OpenAI’s guide recommends following Retry-After when it is valid, falling back to exponential backoff with jitter otherwise, and capping both the number of attempts and the total time spent retrying.
One subtle point: official SDKs often retry automatically. If you also wrap calls in your own retry loop, disable the SDK retries or account for them, otherwise nested loops multiply your traffic.
2. Put a queue in front of the model
Instead of letting every user action call the API directly, production systems push jobs into a queue and let a pool of workers consume them at a controlled rate. A queue smooths bursts, gives you a place to prioritize urgent requests (a user waiting in a chat) over background work (re-indexing documents), and makes retries visible instead of silent.
3. Budget tokens, not just requests
Because token limits are often the first to break, engineers estimate tokens before sending a request and set the maximum output length close to what they actually need. OpenAI notes that its rate limiting counts the maximum of max_tokens and the estimated size of the request, so an oversized output cap consumes quota you never use.
4. Cache repeated context
Many AI apps send the same system prompt, tool definitions or reference documents on every call. Prompt caching reduces cost and latency, and on some providers it also stretches your limits: Anthropic states that tokens read from cache do not count toward its input-tokens-per-minute limit. Our guide to what prompt caching is and why LLM apps reuse prompt prefixes explains how it works.
5. Use batch processing for work that can wait
Classification, summarization or enrichment jobs that don’t need an instant answer can go through batch endpoints. OpenAI’s Batch API, for example, runs large collections of requests without consuming your synchronous rate limits, which keeps capacity free for interactive users.
6. Centralize access and add fallbacks
When several apps or clients share providers, teams route traffic through a single layer that tracks usage per project, enforces internal quotas and can fall back to another model or provider when one is saturated. That is the role of an AI gateway.
A simple production checklist
Log every 429 with the model, the limit that was hit and the remaining-capacity headers.
Separate transient rate limits from quota and billing errors, and alert a human on the latter.
Retry with capped exponential backoff, jitter and retry-after support — in one place, not three.
Queue background workloads and give interactive traffic priority.
Set realistic output limits and cache stable prompt prefixes.
Split projects or API keys per client or feature so one workload can’t starve another.
Review usage tiers before a launch and request higher limits ahead of expected growth.
Why this is a forward-deployed AI engineering skill
Forward-deployed AI engineers work close to the customer: they take a model and connect it to real data, real users and real business processes. In that environment, reliability is part of the deliverable. Knowing how rate limits behave, designing graceful degradation and explaining capacity trade-offs to a client are as important as writing a good prompt. This is exactly the kind of production thinking covered in a Forward Deployed AI Engineering program.
FAQ
What does HTTP 429 mean in an LLM API?
It means “too many requests”: your application exceeded one of the provider’s limits, such as requests or tokens per minute, or in some cases a spend cap.
Should I always retry a 429?
Only when it is a temporary rate limit. Follow the retry-after header if it exists and use backoff with a cap. Quota, billing or spend-limit errors won’t clear by retrying.
How do I get higher rate limits?
Providers raise limits through usage tiers based on spend and account history, and most let you request higher limits for production workloads. Efficient design — caching, batching and right-sized outputs — often buys more headroom than an upgrade.
Are rate limits per user or per organization?
For the major providers they are set at the organization level, with project or workspace limits on top. Every user of your app shares the same pool, which is why internal quotas matter.
Keep learning with Coderhouse
Turning AI prototypes into reliable systems is a core skill across AI, data and go-to-market roles. Explore the three programs:
Forward Deployed AI Engineering Course — learn to build and deploy AI agents and applications that connect to real business tools, data and production constraints.
Data Analytics Course — learn SQL, Python and dashboards to monitor usage, costs and performance with data.
GTM Engineer Course (waitlist) — join the waitlist for early access to the program focused on automated go-to-market systems.
I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.