ErrorsAnthropic 429 rate_limited
Preview — this page is not yet indexed. It publishes once we have a real production observation count for this error (see /errors for the taxonomy dataset).

Anthropic 429 rate_limit_exceeded

Why am I getting Anthropic 429 rate_limit_exceeded?

A Messages API call returns HTTP 429 with a `rate_limit_error` body that names whether it was the request-count or the token-count limit that tripped — the two are tracked and throttled independently on Anthropic, unlike a single combined 429.

Verified 2026-08-08 source

Is this your error?

HTTP 429
{"type":"error","error":{"type":"rate_limit_error","message":"Number of request tokens has exceeded your per-minute rate limit"}}

Why this happens on Anthropic

Source: https://docs.anthropic.com, verified 2026-08-08.

Anthropic enforces requests-per-minute and tokens-per-minute as two separate limits, so a burst of small requests and a single oversized one fail for different reasons even on the same tier — the message text tells you which one, which OpenAI's equivalent body does not always distinguish as explicitly.

The fix

async function callWithBackoff(maxRetries = 5) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      return await client.messages.create({
        model: MODEL,
        max_tokens: 1024,
        messages: [{ role: 'user', content: 'Say hello in one sentence.' }],
      });
    } catch (err) {
      if (err instanceof Anthropic.APIError && err.status === 429) {
        const retryAfter = Number(err.headers?.['retry-after'] ?? 2 ** attempt);
        await new Promise((r) => setTimeout(r, retryAfter * 1000));
        continue;
      }
      throw err;
    }
  }
  throw new Error('exceeded max retries');
}

const response = await callWithBackoff();
console.log(response);

Backoff and retry

Anthropic returns HTTP 429 with a retry-after header.

Back off for the duration in retry-after, then retry with jittered exponential backoff. Requests and tokens are limited separately — a token-limit 429 needs a smaller batch, not just a delay.

Full tier limits: Anthropic rate limits →

What not to do

Don't retry immediately in a tight loop — a burst of retries against a capacity or rate signal just adds load and delays recovery. Use jittered exponential backoff.

Evidence

Reproduced against Anthropic's own documentation and the fixture at code-examples/javascript/anthropic/errors.ts on 2026-08-08; not yet observed in production traffic.

FAQ

Why does Anthropic separate request and token rate limits?

Requests-per-minute and tokens-per-minute are enforced independently, so a burst of many small calls can trip one limit while a single very large call trips the other — the 429 message names which one.

How long should I wait before retrying an Anthropic 429?

Use the retry-after header value with jittered exponential backoff; a token-limit 429 usually also needs a smaller request, not just a delay.

Anthropic provider hubAnthropic rate limitsGet an Anthropic API key