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

ShareCauseHow to confirm
62%Client concurrency too high, or no backoff retryIs your code firing requests in a bare for loop?
28%Relay group concurrency limit reachedSwitch group or channel; if it works, this is it
10%Upstream provider overloaded overallModels 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:

  1. Add exponential backoff: wait 1 second, then 2, 4, 8. Never retry immediately.
  2. Lower concurrency to 1-3, then increase gradually.
  3. 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:

  1. Switch group. Same model, different groups, prices, and limits.
  2. Switch site. The relay comparison records the actual 429 rate for each provider.
  3. A single model returning 429 means that model's channel is limited.

If it still fails

SymptomResponsible party
429 from every site and modelYour client (concurrency or missing backoff)
429 from only one siteThat site's rate limiting
429 from only one modelThat model's channel capacity
429 everywhere at onceThe 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.