short · 3 min
Rate limits
Provider limits on requests and tokens per minute, and designing around them.
updated 29 Sept 2026
We send 20 tiny requests, about 100 tokens each, and the 21st one fails with HTTP 429. We've barely used any tokens. What happened?
Every LLM provider caps how much an organization can push through its API, and it caps more than one thing. A plain web API usually counts requests. But an LLM call can be 50 tokens or 200,000, so providers count tokens too. On the Claude API there are three separate limits per model: requests per minute, input tokens per minute, and output tokens per minute. OpenAI has requests and tokens per minute, plus daily versions. Whichever we hit first stops us. With a limit of 20 requests a minute, 20 tiny requests use it all up, however many tokens are left.
For a sense of size, as of 2026-09, Anthropic's entry tier gives 1,000 requests, 2 million input tokens and 400,000 output tokens per minute on Claude Sonnet 5. That's per organization, so every feature and every developer shares one pool. It's per model, so one model's traffic doesn't eat into another's. And it goes up as you spend more.
A bucket, not a clock
"Per minute" makes it sound like a counter that resets at the top of each minute. On Claude it's a bucket that refills all the time, up to the limit. A burst drains it, then capacity trickles back.
So 60 a minute can really mean about one a second, and a burst fired in the same second can fail while we're nowhere near 60 for the minute. Spread requests out.
Some 429s aren't about the per-minute limits at all. Both providers also
limit how fast usage grows, so a sudden jump can get refused while we're
under every limit. (OpenAI's rule of thumb: past a million input tokens a
minute, grow at most 50% every 15 minutes.) And Anthropic's tiers have a
monthly spend cap. Hitting it also returns 429, but with no retry-after
header and the code enforced_spend_limit_reached. Retrying won't help
until next month, so that one should page a person, not the retry loop.
What counts is different everywhere
Here's where estimates go wrong. Same traffic, different providers, different math.
Cached input: on Claude, tokens read from the prompt cache mostly don't count toward the input limit. With a 2 million limit and 80% of input cached, we can push 10 million input tokens a minute. On OpenAI, cached tokens still count.
max_tokens: on Claude, only tokens actually written count, so a high
max_tokens is free. On OpenAI, each request counts as at least its
max_tokens, so a generous setting on every call eats the limit before a
single token is written.
Failed requests: on OpenAI they still count. Hammering the API after a 429 makes it worse.
Every response also says how much room is left, in headers like
anthropic-ratelimit-input-tokens-remaining or
x-ratelimit-remaining-tokens. Reading those lets us slow down before
hitting zero. Work that can wait can go through the
batch API, which on OpenAI has its own queue and leaves the
live limits alone.
And when a 429 does come back, its retry-after header says how many
seconds to wait. Treat that as a minimum, since retrying earlier fails.
What a good retry looks like after that is retries.
Further reading
- Rate limits, Anthropic docs. The bucket, the three limits, cache-aware counting and spend caps. The tier tables are handy for planning.
- Rate limits,
OpenAI docs. Read it for the ramp rule and how
max_tokensand failed requests count.