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
- Respect the
retry-afterheader when the provider sends one. It is the exact wait the server wants. - 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.
- Cap retries (5 to 6 is plenty) and log the final failure so a person sees it.
- 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_tokensyou 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.