Q&A: 429 Too Many Requests — who exactly is rate-limiting you
A 429 can come from upstream limits, gateway limits, or a spend cap. Read Retry-After and the rate-limit headers first to find the bottleneck, then decide: wait, slow down, or top up.
Q1: What does 429 actually mean?
You exceeded one of the usage limits. Rate limiting has more than one dimension: requests per minute (RPM), tokens per minute (TPM), requests per day, and so on — whichever limit you hit first triggers the 4291. On the Claude side there are two separate token dimensions (input ITPM and output OTPM); exceeding either also returns 4292.
Note that 429 does not mean "you are banned." It means "this minute is full." A 5xx server-overloaded response is a different neighbor: the upstream is busy and usually recovers on its own — nothing to do with your limits.
Q2: Am I capped on requests or tokens? How do I tell?
Read the response headers. Do not guess.
- OpenAI returns
x-ratelimit-limit-requests/x-ratelimit-remaining-requests(request dimension) andx-ratelimit-limit-tokens/x-ratelimit-remaining-tokens(token dimension), plusx-ratelimit-reset-*showing when the limit resets1. - Claude returns
anthropic-ratelimit-requests-*,anthropic-ratelimit-input-tokens-*andanthropic-ratelimit-output-tokens-*, plusanthropic-ratelimit-tokens-*reflecting whichever limit is currently strictest2.
Whichever "remaining" hits zero first is your bottleneck. Request-limited → batch several small tasks into one request; token-limited → trim the input, enable caching, cap max_tokens1.
Q3: I get 429 even without exceeding RPM. Why?
Two common reasons:
- Ramp limits: Claude enforces a separate limit on how fast usage grows — short bursts can trigger 429 even under the per-minute cap, with error code
ramp_limit_exceeded2. OpenAI's equivalent is a 429 with theslow_downcode: your request rate is climbing too quickly even though RPM/TPM limits are not exceeded1. - Failed requests still count toward your limits. Resending in a tight loop only makes it worse — the official docs state plainly that continuously resending a request won't work1.
Q4: How long should I wait? How should I retry?
Honor the Retry-After response header first: wait the seconds it specifies, plus some random jitter1. Claude works the same way — rate-limit 429s carry retry-after2.
Without that header, use exponential backoff with jitter (1s, 2s, 4s... times a random factor). One rule of thumb: when ramping up traffic, increase by no more than 50% every 15 minutes1.
Watch for one special "429 without retry-after": on the Claude side, hitting a spend cap returns 429 without a retry-after header, with error code enforced_spend_limit_reached — waiting is not the answer there; topping up or raising the cap is2.
Q5: I go through a relay and still get 429 — whose limit is it?
It could be any of three layers. Locate it in this order:
- Check the error body format. Is the error JSON your relay's format, or the upstream's native one? A native format usually means an upstream limit; a relay format means reading the specific message.
- Check which headers came back. If the upstream's
anthropic-ratelimit-*orx-ratelimit-*headers are passed through untouched, the bottleneck is upstream; if only the relay's own notice appears, it is likely the relay's concurrency or quota.
- Check the time pattern. Upstream limits recover in minute-level cycles; a saturated gateway pool tracks your own traffic peaks; an out-of-balance account doesn't care about time at all.
One of a relay's core values is spreading load across channels and buffering requests. If 429s cluster at peak hours, first ask whether the relay offers queuing or degradation — don't just retry harder on your side.
Wrap-up checklist
- Implement exponential backoff with jitter in your client, and always respect
Retry-After12. - Log the complete response headers of every 429 — that is how you locate the bottleneck.
- Batch high-frequency small requests; handle long inputs with caching and trimming, not by brute-forcing TPM1.
- Distinguish three 429s: upstream limit (wait), gateway concurrency (slow down or contact the relay), spend cap (raise the limit or top up)2.
- Ramp traffic gently — no more than 50% growth every 15 minutes1.
One-line summary: 429 is a "who and which dimension" question — the answer is written in the response headers. Read them before you act.
Sources & attribution
This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.
- Rate limits — OpenAI · accessed 2026-11-15Note:RPM/TPM definitions, usage tiers, 429 and slow_down, Retry-After and rate-limit headers are from OpenAI's official documentation.
- Rate limits — Anthropic · accessed 2026-11-15Note:Token bucket behavior, anthropic-ratelimit headers, and the 429 differences for ramp limits versus spend caps are from Anthropic's official documentation.
One key for Claude, GPT and 50+ models
The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.