Rate limits
Your spend boundary is a per-customer token cap by model tier class (weekly + monthly). RPM/TPM act as anti-flood burst guards, and token packs add headroom for planned spikes.
Token caps by model tier class
The spend boundary on flat tiers is a hard token cap per model tier class, enforced per customer over a weekly and a monthly window. A model's tier class (budget / mid / premium / ultra) is set by its price. Caps are shared across all keys on an account — N keys draw from one bucket, closing the multi-key gaming exploit older gateways have. Exceed a class's weekly or monthly cap and the request returns 402 token_quota_exceeded. A class with no row for a tier is not available on that tier.
| Tier | Budget (wk / mo) | Mid (wk / mo) | Premium (wk / mo) | Ultra |
|---|---|---|---|---|
| Pro | 40M / 120M | 8M / 24M | 1.5M / 4M | — |
| Enterprise | No fixed token quota — soft cost-velocity alert + contract terms |
Tokens count input + output. Pro covers budget + mid + premium. Ultra-class models are Enterprise territory. Enterprise has no hard token cap — usage is governed by a soft internal cost-velocity alert plus your contract terms.
Free accounts run on the free guarded bucket plus your prepaid balance — see Plans & billing.
Custom per-customer overrides are available — contact [email protected].
RPM / TPM burst guards + inflight cap
Separate from the token cap (your spend boundary), every tier has RPM and TPM burst guards plus a per-key inflight cap. These are anti-flood limits — they protect upstream providers and your own tail latency, not your monthly budget. Tripping one returns 429 rate_limit_exceeded (or concurrent_limit_exceeded for the inflight cap).
| Tier | RPM | TPM | Max concurrent |
|---|---|---|---|
| Free | 20 | 40,000 | 25 |
| Free with top-up balance | 120 | 300,000 | 25 |
| Pro | 120 | 500,000 | 150 |
| Enterprise | 30,000 | 100M | 500 |
RPM = requests / minute (rate). TPM = total tokens / minute (input + output). Max concurrent = simultaneous in-flight requests per key — headroom for concurrency, not a throughput cap.
Free with top-up balance applies while your account holds top-up money beyond the signup trial credit, and for 14 days after your last top-up. After that, with no top-up balance left, the account returns to the Free limits. The signup credit on its own does not raise your limits. Budget and Plus Passes do not raise RPM/TPM today — a Pass account keeps the Free (or Free with top-up balance) limits. TPM is checked against the tokens you used in the last 60 seconds, so one large request (for example a coding agent sending a long context) can use a whole minute's budget on Free.
Agent session ceiling
Requests that carry an X-Session-ID header (many coding agents send one) are also counted per session, as a safety stop for runaway agent loops. A session is blocked once it reaches any of:
| Ceiling | Limit |
|---|---|
| Tokens (input + output, cumulative) | 5,000,000 |
| Steps (requests) | 400 |
| Cost | $5 |
The counters reset after 15 minutes with no requests in that session. A blocked request returns 429 agent_session_ceiling_exceeded with a reason such as platform:max_tokens. Start a new session (a new X-Session-ID) to continue. The same ceilings apply on every plan; requests without X-Session-ID are not session-counted.
Two different boundaries
402 token_quota_exceeded— you spent your weekly or monthly token cap for a model tier class. The response carriesmodel_tier_classandwindow(weekly|monthly). Retrying won't help until the window rolls over — buy a token pack, upgrade your tier, or move the workload to a class you still have budget in.429 rate_limit_exceeded— you tripped the RPM/TPM burst guard. Transient: back off and retry, respectingRetry-After.
Read these instead of hitting a limit
Every successful response reports your current RPM/TPM burst-guard budgets. Use them to throttle client-side before the guard fires. Token-cap exhaustion surfaces as a 402 token_quota_exceeded, distinct from the 429 rate_limit_exceeded flood guard.
200 — burst-guard headers on every response
402 — token quota exceeded (the spend boundary)
429 — burst guard tripped (RPM/TPM flood)
429 — concurrent (inflight) cap
| Header | Description |
|---|---|
x-anoman-rate-limit-rpm | RPM burst-guard cap for your tier |
x-anoman-rate-remaining-rpm | Requests left in the current minute |
x-anoman-rate-limit-tpm | TPM burst-guard cap for your tier |
x-anoman-rate-remaining-tpm | Tokens left in the current minute |
retry-after | Standard HTTP header — seconds to wait. Only on 429. |
x-anoman-tier | Customer's tier (free/pro/enterprise) |
x-anoman-inflight-cap | Concurrent-request ceiling (only on 429 from this bucket) |
x-anoman-inflight-current | Current concurrent count (only on 429) |
Respect Retry-After
The OpenAI / Anthropic SDKs retry automatically by default, but they ignore Retry-After in some versions. Here's an explicit pattern that picks server-suggested wait when present, exponential backoff otherwise:
Python — respect Retry-After
TypeScript — same pattern
Concurrent vs rate
The two 429 codes mean different things:
rate_limit_exceeded— you tripped the RPM/TPM burst guard. Retry after the window rolls over.concurrent_limit_exceeded— too many in-flight at the same instant. Drop concurrency or wait for one to complete.
The inflight cap is independent of RPM/TPM. A Pro account at 120 RPM with 150 inflight cap can fire 120 sequential requests per minute or up to 150 simultaneous — but not 150 simultaneous of 5-second calls (that would burst RPM way over 120).
Why both? RPM protects upstream services from total volume. Inflight cap protects your own latency budget — too many in-flight requests waiting on the upstream queue makes everyone slower. Lower inflight = predictable tail latency.
Buy extra tokens when you need headroom
On a flat tier, when a model tier class is close to its token cap, buy a token pack to add temporary headroom to that class for a fixed duration. It's an additive bump to the class's cap — not a change to your RPM/TPM burst guards. Costs are deducted from your prepaid balance.
Python — buy a token pack
Enterprise doesn't need token packs — it has no hard token cap to begin with.
Watch your token caps in real time
The Rate Limits dashboard shows per-class token usage and RPM/TPM burst guards with sparklines.