How to fix 429 Too Many Requests on AI APIs

A 429 status means the provider refused the request because you sent too much, too fast, or because the account has nothing left to spend. The fix depends on which of those it is, so read the error body before you change any code.

Errors and limits · Updated November 25, 2026

Step 1: read the error type, not just the status code

All major providers use HTTP 429, but the body tells you why. On OpenAI a 429 with rate_limit_exceeded means you hit a requests-per-minute or tokens-per-minute cap, while insufficient_quota means billing, not speed. Anthropic returns rate_limit_error for limits and uses a separate 529 overloaded_error when its own servers are busy. Google's Gemini API reports RESOURCE_EXHAUSTED.

If the body points to quota or billing, retries will never help. Go to the quota guide instead.

Step 2: retry the right way

  1. Respect the retry-after header when the provider sends one. It is the exact wait the server wants.
  2. Otherwise use exponential backoff with jitter: wait about 1 second, then 2, 4, 8, adding a random fraction so parallel workers do not retry in lockstep.
  3. Cap retries (5 to 6 is plenty) and log the final failure so a person sees it.
  4. Never retry in a tight loop. It burns your per-minute budget and makes the 429s last longer.

Step 3: reduce what each request costs against the limit

  • Tokens-per-minute limits count the max_tokens you request, not only what the model writes. Set it to what you actually need.
  • Trim chat history. Sending the full conversation on every turn multiplies token usage quickly.
  • Move repeated background (company info, style rules) into cached or shared context instead of pasting it into every prompt.
  • Batch non-urgent jobs through the provider's batch API, which has separate, larger limits and usually a discount.

Step 4: raise or spread the limit

Limits grow with your usage tier and payment history, so a new account hits them sooner. Check the limits page in the provider console and request an increase if your volume is real.

For teams, the bigger problem is often one shared key used by everyone and every automation. One heavy script can starve the whole company. Separate keys per team or project, with their own budgets, keep a single workload from blocking the rest. That is how Intrascope budgets are set up: limits per user, team and project on top of the provider's own.

Frequently asked questions

  • Usually yours: too many requests or tokens per minute for your tier, or no remaining quota. Provider-side overload on Anthropic is a separate 529 status.

  • Use the retry-after header if present. Otherwise start with about one second and double the wait on each retry, with a little randomness.

  • Sometimes. Limits are often set per model, so moving routine traffic to a smaller model frees capacity on the main one.

AI for the whole team, with limits that make sense

Intrascope gives every employee approved models, shared company context and budgets per user and team. Your own API keys or managed usage. 7-day free trial, no card.