Three 429s with the same type
All of these return HTTP 429 with "type": "rate_limit_error". On the Messages API, error.details.error_code tells them apart:
error_code | What happened | retry-after | Fix |
|---|---|---|---|
| none | You went over requests, input tokens or output tokens per minute for a model | When present, wait that long | Slow down, spread requests, cache prompts |
ramp_limit_exceeded | Usage on a model grew too fast, even under your limits | Wait at least that long | Hold traffic where it succeeds, then grow by at most one step a minute |
enforced_spend_limit_reached | The tier's monthly spend cap: $500 (Start), $1,000 (Build), $200,000 (Scale) | Never sent | Request tier increase in the Console, or wait until 00:00 UTC on the 1st |
The spend-cap response looks like this:
{"type": "error",
"error": {"type": "rate_limit_error",
"message": "You have reached your API usage limits: ... You will regain access on 2026-09-01 at 00:00 UTC.",
"details": {"error_code": "enforced_spend_limit_reached"}},
"request_id": "req_..."}
Not a 429: a spend limit you set returns 400 invalid_request_error starting You have reached your specified API usage limits. Raise or remove it under Spend limits. The Claude Code workspace is the exception and can answer with a 429 that has retry-after.
Fix a rate-limit 429
- Check your tier and limits at platform.claude.com/usage/limits. Limits are per organization and per model class: RPM, ITPM and OTPM.
- Smooth out bursts. A limit of 60 RPM can be enforced as 1 request per second, so a burst fails even when the minute total is fine. The bucket refills continuously; there is no fixed reset time to wait for.
- Cache repeated input. Tokens read from the prompt cache don't count toward ITPM; only uncached input and cache writes do.
- Don't shrink
max_tokensfor this. OTPM counts tokens actually generated, so a highmax_tokenscosts nothing against the limit. - Move bulk work to the Message Batches API. It has its own limits and no ramp limits.
- Separate noisy workloads with per-workspace limits. The organization limit still applies on top.
Handle the spend cap before the general class, because RateLimitError also catches it:
import anthropic
client = anthropic.Anthropic()
try:
msg = client.messages.create(model="<model>", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}])
except anthropic.EnforcedSpendLimitReachedError:
raise # monthly cap: stop, retrying won't work until access resumes
except anthropic.RateLimitError:
... # back off; the SDK has already retried, following retry-after
Read the rate-limit headers
| Header | Meaning |
|---|---|
retry-after | Seconds to wait; earlier retries may fail. Not on every 429 |
anthropic-ratelimit-requests-remaining | Requests left before you are limited |
anthropic-ratelimit-input-tokens-remaining / output-tokens-remaining | Tokens left, rounded to the nearest thousand |
anthropic-ratelimit-*-reset | When that limit is fully replenished (RFC 3339 time) |
anthropic-workspace-id | Which workspace the key counted against |
The anthropic-ratelimit-tokens-* headers report whichever limit is most restrictive right now, such as a workspace limit.
The same limit in Claude Code
API Error: Request rejected (429) · this may be a temporary capacity issue...: the rate limit of your API key, Bedrock project or Google Cloud project. Run/status: a strayANTHROPIC_API_KEYcan send traffic through a low-tier key instead of your subscription. Then run fewer parallel subagents, or use a smaller model for scripted runs.API Error: Server is temporarily limiting requests (not your usage limit): a short throttle unrelated to your plan. Claude Code retries it with backoff since v2.1.199; if it keeps showing, check status.claude.com.You've hit your session limit · resets 3:45pmand the weekly, Opus and Sonnet variants are plan usage limits, not API rate limits./usageshows when they reset; for the Opus or Sonnet limit,/modelto another family keeps you working.
Still failing?
- Need more room: Request tier increase on the Console's Rate limits page; for urgent needs, Anthropic support.
- New organizations can start in an Evaluation tier with lower limits that rise automatically as usage history builds.
- Quote the
request-idresponse header when you contact support. - Seeing 529
overloaded_errorinstead? That is capacity across all users, not your limit: Claude API 529.
Running Claude Code, Codex or Cursor on real repos, or shipping an AI agent? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers. Request a Quick Review
FAQ
Why do I get a Claude API 429 when I'm under my rate limit?
Two documented reasons: limits can be enforced over short intervals, so a burst fails even when the per-minute total is fine, and ramp limits reject a sharp increase in usage. A ramp-limit 429 has error_code ramp_limit_exceeded.
Do cached tokens count toward Anthropic's input token rate limit?
No. Tokens read from the prompt cache don't count toward ITPM. Uncached input tokens and tokens written to the cache do.
When does the Anthropic API monthly spend cap reset?
At 00:00 UTC on the first day of the next month, unless a higher tier is granted sooner. The 429 for it has no retry-after header.
Does a high max_tokens use up my Claude output token rate limit?
No. OTPM counts only tokens actually generated; max_tokens is not part of the calculation.
Related errors
Sources
Read 30 Nov 2026. These tools change often: if a step no longer matches, the linked page wins.
- Claude API docs: Rate limits: platform.claude.com/docs/en/api/rate-limits
- Claude API docs: Errors: platform.claude.com/docs/en/api/errors
- Claude Code docs: Error reference: code.claude.com/docs/en/errors
- Claude status page: status.claude.com
- LLM API cost checker: find LLM calls with no limits or retries capped
- Guide: API rate limiting and 429 Too Many Requests: rate limits on your own API
- Exposed API key checker: find API keys committed to a repo or shipped to the browser