Claude API Usage Limits Exceeded: Troubleshooting
If you're seeing "usage limit exceeded," "rate limit exceeded," or a 429 response from Claude, it almost always means one of three things: you've hit a per-minute request or token cap, you've exhausted a monthly spend/credit cap, or too many requests are running concurrently. Each has a different fix, and treating them the same way (just "retry and hope") is why the error keeps coming back.
This guide walks through how to identify exactly which limit you hit, how to fix it in code, and how to stop it from happening in production.
The three different "limits" that trigger this error
Anthropic enforces limits at several layers, and the error message doesn't always tell you which one fired:
- Requests per minute (RPM) — too many API calls in a short window.
- Tokens per minute (TPM) — input + output tokens across all requests in a window, even if request count is low.
- Monthly usage / spend cap — you've hit a billing ceiling or prepaid credit limit, independent of rate.
- Concurrency limits — too many requests in flight at the same time, common with parallel batch jobs.
The fix for a TPM limit (reduce payload size, slow down) is different from the fix for a monthly cap (you need more budget or a plan upgrade), so step one is always figuring out which one you actually hit.
Step 1: Read the error payload, not just the status code
A 429 on its own is not enough information. Log the full response body — Anthropic's error objects include a type field such as rate_limit_error or overloaded_error, and often a retry-after style header indicating how long to wait.
try {
const res = await fetch("https://api.anthropic.com/v1/messages", {
method: "POST",
headers: {
"x-api-key": process.env.ANTHROPIC_API_KEY,
"anthropic-version": "2023-06-01",
"content-type": "application/json"
},
body: JSON.stringify({ model: "claude-3-5-sonnet-20241022", max_tokens: 1024, messages })
});
if (res.status === 429) {
const retryAfter = res.headers.get("retry-after");
const body = await res.json();
console.error("Limit hit:", body.error?.type, body.error?.message, "retry-after:", retryAfter);
}
} catch (err) {
console.error("Request failed:", err);
}
If retry-after is present, that's your authoritative wait time — don't guess shorter intervals, you'll just get rate-limited again.
Step 2: Separate "too fast" from "too much"
If the error disappears when you slow down requests but reappears under the same load, you're hitting RPM or concurrency limits. If it persists even at low request rates, check your token usage — a handful of requests with huge context windows (long documents, big system prompts, large tool outputs) can burn through a TPM allowance faster than dozens of small ones.
Practical checks:
- Log
usage.input_tokensandusage.output_tokensfrom every response. - Sum tokens over rolling one-minute windows and compare against your plan's TPM limit.
- If token usage spikes irregularly, look for unbounded conversation history or unsummarized context being sent every call.
Step 3: Implement real backoff, not a fixed retry
A flat "retry after 1 second" loop will keep hammering the limit. Use exponential backoff with jitter, and honor the retry-after header when it's present:
async function callWithBackoff(fn, maxAttempts = 5) {
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try {
return await fn();
} catch (err) {
if (err.status !== 429 || attempt === maxAttempts) throw err;
const base = Math.min(1000 * 2 ** attempt, 30000);
const jitter = Math.random() * 500;
await new Promise(r => setTimeout(r, base + jitter));
}
}
}
This alone resolves a large share of transient "exceeded" errors caused by short traffic bursts.
Step 4: Fix the architecture, not just the retry logic
Backoff buys you resilience, not headroom. If you're consistently near the ceiling, address the root cause:
- Batch and queue instead of fanning out. If a feature triggers 50 parallel Claude calls per user action, queue them and process a controlled number concurrently.
- Cache repeated prompts. If the same system prompt + similar inputs run often, cache responses where correctness allows it.
- Trim context aggressively. Don't resend full conversation history every turn if a summary will do — this is often the single biggest TPM reducer.
- Split traffic across keys/projects for genuinely separate workloads (e.g., internal testing vs. production) so one doesn't starve the other.
Step 5: Know when it's a plan problem, not a code problem
Sometimes the fix isn't technical — your actual production traffic has outgrown the limits tied to your current access tier. At that point you either request a limit increase, or you add a layer that gives you clearer visibility into what's consuming quota before you decide.
This is where a wrapper like SubToAPI helps even if you're calling Claude directly today: it turns your existing Claude access into a standard HTTPS API with per-key usage metadata, so you can see exactly which application, endpoint, or team member is driving token consumption instead of debugging blind. Streaming and tool use work the same way you'd expect from the native API — see /docs/streaming and /docs/tools — but you get usage breakdowns and seat-level limits in one dashboard instead of parsing raw error logs across services. If you're scaling a team past a single shared key, that visibility is usually what turns "mysterious 429s" into an actual root cause within minutes. Check /pricing or start with a trial at /signup.
Checklist before you escalate to support
- [ ] Confirmed the exact
error.typefrom the response body, not just the status code - [ ] Checked whether it's RPM, TPM, concurrency, or monthly cap
- [ ] Logged token usage per request over a rolling window
- [ ] Implemented exponential backoff with jitter and
retry-afterhandling - [ ] Reduced redundant context/history sent per request
- [ ] Queued or throttled parallel request fan-out
- [ ] Confirmed the limit isn't actually a billing/credit cap requiring a plan change
questions
Why am I hitting usage limits even with very few requests per minute? You're likely hitting a tokens-per-minute cap, not a request cap. Large prompts, long conversation history, or big tool outputs can exhaust token allowances with only a handful of calls. Log usage.input_tokens and usage.output_tokens to confirm.
Is "usage limit exceeded" the same as a billing cap? No. Rate limits (RPM/TPM) reset every minute and are about traffic speed. A monthly usage or spend cap is a hard ceiling tied to billing and won't reset until the next cycle or until you raise the limit — retrying faster won't fix it.
What's the fastest fix for production code hitting intermittent 429s? Add exponential backoff with jitter and respect any retry-after header in the response. That resolves most burst-related errors immediately; for sustained limit pressure, you'll also need to reduce request concurrency or trim per-request token size.