Weekly field note

Find Which Rate Limit Tripped Before You Retry

Published December 6, 2026

Per-minute counters, a ramp limit and an exhausted budget return the same status code, and only some of them clear by waiting

139 Server Room 01

*Image: 139 Server Room 01 by Indrajit Das, licensed under CC BY-SA 3.0.*

A 429 covers a spent per-minute counter, a cap on how fast usage grew, and an exhausted account budget. Two of those clear on retry and one does not, and the counter that ran out picks whether the fix is concurrency, request size, caching or a slower ramp.

HTTP 429 covers several different conditions on the Claude and OpenAI APIs: a spent per-minute counter, a cap on how fast usage grew, and an exhausted account budget. The status code alone does not say which one fired, and the recovery differs for each.

The Claude rate-limit page separates a per-minute rate limit from a ramp limit and from an account spend cap, each with its own recovery. Yet the counters underneath the retryable ones measure different dimensions, so raising concurrency after a token 429 spends the exhausted limit faster. The OpenAI page adds another condition to the same status family, a hard spend limit that returns 429 for affected requests.

The procedure below reads the response before it changes anything, names the counter that ran out, then picks the single change that raises headroom on that counter. Numbers in the worked example are invented and labeled as such.

What the same status code covers

The Claude page documents three 429s that are not the same event:

The OpenAI page splits the status family on its own terms:

The OpenAI page warns that other errors can use the same statuses, so the response body has to be inspected before a recovery action is chosen. The error code is the field that separates a counter from a budget.

What each counter counts

The Claude page measures the Messages API in requests per minute, input tokens per minute and output tokens per minute for each model class. Its input-token counter has an exclusion that changes the arithmetic: default ITPM limits count only uncached input tokens, so cache_read_input_tokens do not count, while input_tokens and cache_creation_input_tokens do. The page gives the total as cache_read_input_tokens plus cache_creation_input_tokens plus input_tokens.

input_tokens covers only the tokens after the final cache breakpoint, which makes the field easy to misread as the whole request. The page's own example shows a 200,000-token cached document with a 50-token question reporting input_tokens: 50. ITPM is estimated at the beginning of each request and adjusted during it, and OTPM counts only tokens actually generated, with max_tokens excluded from that calculation.

Throughput follows from the exclusion. The page's example runs a 2,000,000 ITPM limit at an 80 percent cache hit rate and processes 10,000,000 total input tokens per minute, because the cached 8,000,000 do not count.

The OpenAI page measures differently. It lists RPM, RPD, TPM, TPD, IPM and audio minutes, and states that a limit can be hit on any of them depending on what occurs first. Limits are defined at the organization and project level, and they vary by model. Its token accounting includes a field the other API excludes: the page states that the rate limit is calculated as the maximum of max_tokens and the estimated number of tokens based on the character count of the request, and recommends setting max_tokens close to the expected response size. At 6,000 estimated input tokens and a max_tokens of 4,096, the input estimate is the larger number, so the cap leaves the counted figure unchanged. A cap above the estimate becomes the counted number for every request in the run, whether or not a response approaches it. Unsuccessful requests also count, because the page notes that they contribute to the per-minute limit.

The 429 that waiting will not clear

An exhausted budget fails until someone changes the account. The Claude page supplies the reset: enforced_spend_limit_reached pauses usage until 00:00 UTC on the first day of the next month, unless a higher limit is requested sooner.

The OpenAI page reaches the same instruction from the other direction. A hard spend limit returns 429 for affected requests, its retry guidance says not to retry quota, billing or other errors that require the caller to take action, and it notes that Retry-After does not mean those errors can be resolved by retrying.

Without the error code, a retry loop treats a closed budget like a busy counter. It waits, tries again, and writes the same failure into the log until the attempt limit ends the run.

How the capacity comes back

The Claude page describes a token bucket: capacity is continuously replenished up to the maximum rather than reset at fixed intervals. A rate of 60 requests per minute might be enforced as one request per second, so a short burst can exceed the limit while the minute average stays under the table's number. The page describes its figures as maximum allowed usage.

The OpenAI page treats retry-after as a floor. Wait at least that long, add a small random delay so several clients do not retry together, and fall back to exponential backoff with jitter when the header is missing. The page also warns that nested loops multiply requests, because the official SDKs retry eligible 429 and 503 responses on their own, so an application-level retry budget has to disable or account for the SDK's retries.

Choosing the fix

Which counter ran out decides what changes.

An invented budget sheet

The sheet below is invented to show the arithmetic. The limits are placeholders, the traffic is illustrative, and no job was measured for this article.

workflow      nightly enrichment, 4,000 requests
request       6,000 input tokens, 700 output tokens, max_tokens 10,000
limits        1,000 RPM   2,000,000 ITPM   400,000 OTPM     invented
latency       about 1 second per request

in flight     requests/min    input/min    output/min
20              1,200          7,200,000      840,000
16                960          5,760,000      672,000
 9                540          3,240,000      378,000
 5                300          1,800,000      210,000

fits ITPM     2,000,000 / 6,000 = 333 requests/min, about  5 in flight
fits OTPM       400,000 /   700 = 571 requests/min, about  9 in flight
fits RPM        1,000           = 1,000 requests/min, about 16 in flight

The input-token counter bound first, at about 5 in flight. Output tokens allowed about 9 and requests about 16, so traffic that fits the input counter fits the other two. The same sheet with 5,000 of the 6,000 input tokens served from cache counts 1,000 tokens per request against ITPM, which raises that ceiling to about 33 in flight, and the output counter then binds at about 9, because 700 generated tokens per request do not change when the input is cached. The cached result depends on the prefix hitting, and a deployment that changes a byte before the cache breakpoint returns the request to 6,000 counted tokens.

The sheet's cap sits above the input estimate, so the OpenAI accounting changes the request budget. Every request counts 10,000 tokens against TPM while the response needs about 700, so the cap costs 9,300 tokens of headroom per request on output that never arrives.

Where this stops

The numbers above belong to the two pages, and each is a table for that provider's tiers. Both pages set limits at the organization level and vary them by model, and both allow narrower scopes beneath that, workspaces on the Claude API and projects on the OpenAI API. The limits change, and the account's own limits page is the only authority on what applies to a given key.

Response shapes move. The OpenAI page records that rapid traffic increases now return 429 with slow_down where endpoints previously returned 503 with that code, and that video requests moved from invalid_request_error to rate_limit_error. A handler that keys rapid-traffic failures to 503, or to invalid_request_error for video jobs, misses the response it now receives.

Neither page publishes how often these conditions occur. Neither page promises that a retry succeeds.

The handler needs three fields before it waits: the error code, whether retry-after is present, and the remaining count against the limit for the counter the error names.

---

Read next: Auditing a Prompt for Cache Hits: Prefix Order, Breakpoints and Minimum Lengths

---

Max Petrusenko writes about AI automation, agent configuration and the evidence behind software claims. He works remotely in software development. Read more on Medium, X and LinkedIn.

If this saves your overnight job from retrying a closed budget, pass it on to whoever owns the retry loop.