ERROR CODES / ENGLISH
429 Too Many Requests: retry without burning quota
How to tell client-side rate limiting from a relay group cap or upstream overload, with backoff retry code you can copy.
Reviewed 2026-11-13 · ERROR CODES / 429 · Chinese detail: 完整中文页
What it means
HTTP 429 means rate limiting, not an invalid API key. Direct calls: you are sending requests too fast. Through a relay: usually the relay group's concurrency cap, not your traffic.
Quick test: wait 60 seconds, then resend the same request. Success means rate limiting; failure means keep checking.
Vendor examples:
// OpenAI
Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-4o in organization org-xxx on requests per min (RPM): Limit 500, Used 500.', 'type': 'requests', 'code': 'rate_limit_exceeded'}}
// Anthropic
{"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your per-minute rate limit"}}
// Common relay response (new-api / one-api family)
当前分组上游负载已饱和,请稍后再试
Common causes
| Share | Cause | How to confirm |
|---|---|---|
| 62% | Client concurrency too high, or no backoff retry | Is your code firing requests in a bare for loop? |
| 28% | Relay group concurrency limit reached | Switch group or channel; if it works, this is it |
| 10% | Upstream provider overloaded overall | Models from other vendors fail too |
How to confirm
The 60-second test separates rate limiting from authentication and quota problems. The table below locates the source.
Fix
Direct calls:
- Add exponential backoff: wait 1 second, then 2, 4, 8. Never retry immediately.
- Lower concurrency to 1-3, then increase gradually.
- Check whether your RPM / TPM quota is really exhausted.
import time, random
def with_retry(fn, max_attempts=5):
for i in range(max_attempts):
try:
return fn()
except Exception as e:
if "429" not in str(e) or i == max_attempts - 1:
raise
wait = min(2 ** i, 30) + random.random()
time.sleep(wait)
Through a relay:
- Switch group. Same model, different groups, prices, and limits.
- Switch site. The relay comparison records the actual 429 rate for each provider.
- A single model returning 429 means that model's channel is limited.
If it still fails
| Symptom | Responsible party |
|---|---|
| 429 from every site and model | Your client (concurrency or missing backoff) |
| 429 from only one site | That site's rate limiting |
| 429 from only one model | That model's channel capacity |
| 429 everywhere at once | The upstream provider |
Three days of repeated 429s despite switching groups means the site's capacity is insufficient. Switch.
The error diagnostician implements this logic.
General guidance, not a statement about any specific provider. For measured data, see the relay directory and method.