Anthropic Claude 429 Rate Limit Error: Causes and Fixes

Quick Fix

Getting 429 rate_limit_error from the Anthropic API? Start here:

  • Honor the retry-after header and retry with exponential backoff + jitter — most 429s clear in seconds.
  • Read the anthropic-ratelimit-* headers to see whether you hit requests, input tokens, or output tokens (Claude limits them separately).
  • Don’t confuse it with 529 Overloaded — that’s Anthropic’s capacity, not your limit. Different fix; see below.

Anthropic returns HTTP 429 with type: "rate_limit_error" when you exceed your account’s per-minute allowance. Claude meters three things separately — requests per minute (RPM), input tokens per minute (ITPM), and output tokens per minute (OTPM) — so you can be well under your request count and still get throttled on tokens. Almost every 429 is recoverable with backoff; the rest is a tier upgrade.

What this error means

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

The response carries headers that tell you exactly which ceiling you hit and when it resets:

Anthropic rate-limit response headers — read these to react precisely.
HeaderWhat it tells you
retry-after Seconds to wait before retrying (honor this first)
anthropic-ratelimit-requests-remaining Requests left in the current window
anthropic-ratelimit-input-tokens-remaining Input tokens left this minute
anthropic-ratelimit-output-tokens-remaining Output tokens left this minute
anthropic-ratelimit-*-reset RFC-3339 time the bucket refills

429 vs 529 — don’t treat them the same

Two different problems

A 429 is about your usage; a 529 is about Anthropic’s capacity.

Anthropic 429 vs 529.
429 rate_limit_error529 Overloaded
Cause You exceeded your RPM/ITPM/OTPMAnthropic is at capacity globally
Under your control? Yes — throttle or tier upNo — just back off and retry
Fix Backoff + reduce rate / raise tierBackoff with longer waits; failover

If you’re chasing 529s rather than 429s, use the dedicated Claude 529 Overloaded fix.

Common causes

  • Bursty concurrency. A parallel fan-out or retry storm exceeds RPM in one window even when your average rate is fine.
  • Token throughput, not request count. Long prompts (big context, documents, tool results) burn ITPM fast; large generations burn OTPM. Check which header hit zero.
  • Low tier. New accounts start at Tier 1 with modest limits that rise as you spend and age.
  • Shared key across workloads. One key for app + cron + dev means a batch job starves live traffic.

How to fix it

Exponential backoff that honors retry-after

The official SDKs retry 429/529 automatically (twice by default). Raise that, and add your own loop for control:

Python — backoff honoring retry-after
import anthropic, time, random

client = anthropic.Anthropic(max_retries=5)  # SDK retries 429/529 with backoff

def chat_with_backoff(messages, model="claude-sonnet-4-6", max_attempts=6):
  for attempt in range(max_attempts):
      try:
          return client.messages.create(model=model, max_tokens=1024, messages=messages)
      except anthropic.RateLimitError as e:
          if attempt == max_attempts - 1:
              raise
          retry_after = None
          if e.response is not None:
              retry_after = e.response.headers.get("retry-after")
          delay = float(retry_after) if retry_after else (2 ** attempt) + random.random()
          time.sleep(delay)

msg = chat_with_backoff([{"role": "user", "content": "Hello"}])
print(msg.content[0].text)
JavaScript / Node — explicit backoff with jitter
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ maxRetries: 5 });
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

async function chatWithBackoff(messages, { model = "claude-sonnet-4-6", maxAttempts = 6 } = {}) {
for (let attempt = 0; attempt < maxAttempts; attempt++) {
  try {
    return await client.messages.create({ model, max_tokens: 1024, messages });
  } catch (err) {
    if (err?.status !== 429 || attempt === maxAttempts - 1) throw err;
    const retryAfter = Number(err?.headers?.["retry-after"]);
    const backoff = Number.isFinite(retryAfter)
      ? retryAfter * 1000
      : 2 ** attempt * 1000 + Math.random() * 1000;
    await sleep(backoff);
  }
}
}

const msg = await chatWithBackoff([{ role: "user", content: "Hello" }]);
console.log(msg.content[0].text);

Throttle proactively and watch the headers

Read anthropic-ratelimit-*-remaining on each response and slow down as any bucket nears zero — cheaper than absorbing 429s. For batch work, put requests behind a token bucket sized just under your tier’s RPM and token limits.

Tier up or cut token throughput

  • Raise your tier by adding credits and accumulating spend — limits scale with tier. See the Anthropic Claude rate limits reference.
  • Use the Message Batches API for non-realtime work — separate, higher throughput at a discount, off your live budget.
  • Cut tokens with prompt caching for long, repeated prefixes (system prompts, few-shot, big context) so they don’t recount against ITPM every call.
  • Route tolerant work to a smaller model (e.g. Haiku) with higher headroom.

How to prevent it

  • Throttle every batch behind a limiter under your real ceilings.
  • Adapt to the remaining-token headers instead of waiting for the 429.
  • Cache repeated context to shrink ITPM.
  • Separate keys per workload so bulk jobs can’t starve live traffic.
Watch out

Uncapped, jitter-free retries make 429s worse: clients retry in lockstep, re-saturate the limit, and compound. Always cap attempts and randomize the backoff.

Failover when one provider throttles

Keep traffic flowing when Claude rate-limits by failing over to another provider. OpenRouter routes across providers on 429s behind one OpenAI-compatible API — a useful pressure valve for bursty load. (Affiliate link; you can build equivalent failover with the code above.)

What to do next

  1. Honor retry-after and add capped backoff with jitter.
  2. Read the anthropic-ratelimit-* headers to know whether requests, input, or output tokens hit zero.
  3. Throttle batch work under your tier limits and cache repeated context.
  4. Tier up or use the Batches API if you’re consistently at the ceiling.

Frequently asked questions

What's the difference between Anthropic's 429 and 529 errors?
A 429 (rate_limit_error) means you exceeded your own per-minute request or token limit — throttle or tier up. A 529 (Overloaded) means Anthropic's servers are at capacity globally — it's not your limit; back off with longer waits and consider failover.
Why do I get a 429 when my request count is low?
Claude meters input and output tokens per minute separately from requests. Long prompts blow through input-tokens-per-minute (ITPM) and big generations through output-tokens-per-minute (OTPM) well before you hit RPM. Check which anthropic-ratelimit-*-remaining header reached zero.
How long should I wait before retrying?
If the response includes a retry-after header, wait exactly that long. Otherwise use exponential backoff with jitter (~1s, 2s, 4s, 8s plus randomness), capped at a handful of attempts. Most rate-limit 429s clear within seconds.
Do the Anthropic SDKs retry automatically?
Yes — the official Python and TypeScript SDKs retry 429 and 529 with backoff (two retries by default). Raise the count with max_retries / maxRetries, but still cap attempts and monitor.
How do I raise my Anthropic rate limits?
Add credits and accumulate spend to move up usage tiers, which raises RPM and token-per-minute limits. For bulk workloads, use the Message Batches API (separate higher throughput) and prompt caching to cut input tokens.