Rate Limits
Per-IP and per-key rate limits, how tiers are picked, what 429 vs 403 mean, and how to retry in your client.
AnyRouter limits request rate per IP (anonymous traffic) and per API key (authenticated traffic), over a sliding 60-second window using Cloudflare rate-limiting bindings. There is no daily quota. Your plan sets the tier (Pricing & Plans).
Tiers
| Caller | Tier | Limit |
|---|---|---|
| Anonymous (no API key) | per-IP | 300 req / 60s |
Go from a donated key, free-tier model (anyrouter/free or *:free) | free-go-donation | 60 req / 60s per account |
| Go, free-tier model | free-go | 150 req / 60s per account |
| Pro, Pro+ or Max, free-tier model | free-pro | 400 req / 60s per account |
Plan go, paid model | go | 600 req / 60s |
Plan free or payg, paid model | paid-model | 600 req / 60s |
Plan pro, paid model | pro | 1200 req / 60s |
Plan pro_plus or max, paid model | power | 1800 req / 60s |
Plan enterprise, any model | enterprise | 2400 req / 60s |
POST /api/v1/decisions, any model, any plan | decision | 60 req / 60s |
- Free-tier models need Go or higher and have no daily cap. The limit counts per account across all your keys. A Free-plan request to a free model returns
403free_tier_requires_subscription. See Free Tier. - Paid-model limits are a separate counter, so upgrading never lowers a limit.
X-RateLimit-Tierisprofor Pro andpowerfor Pro+ and Max (legacy identifiers).- Over a free-model limit the API returns
429rate_limit_exceededwithRetry-After: 60; the message names your plan, the limit and the plan to upgrade to.
Decisions: free, no plan quota, fair-use burst cap
Decision models through anyrouter/decision are free on Go and higher, with no credits, BYOK key or plan quota needed. Free gets a 5-request trial shared with free models.
Every request to POST /api/v1/decisions (or /api/v1/systemone) has its own per-key fair-use burst cap of 60 requests per minute on every plan, so one runaway script cannot flood the shared models. It is a separate counter: decision traffic does not use your chat limit. A tripped cap returns 429 rate_limit_exceeded with Retry-After: 60 and X-RateLimit-Tier: decision.
Response headers
Every API response, including errors and GET /api/v1/health, /models and /credits, carries:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Per-window request cap for the tier you hit |
X-RateLimit-Window | Window length in seconds (always 60) |
X-RateLimit-Tier | One of ip, free-go-donation, free-go, free-pro, free-model (enterprise), paid-model, go, pro, power, enterprise, decision, starter-window |
RateLimit-Limit | IETF draft header, same number as X-RateLimit-Limit |
RateLimit-Policy | IETF draft policy, e.g. 300;w=60 (cap ; window seconds) |
X-RateLimit-Remaining and X-RateLimit-Reset are not emitted; the edge limiter does not expose the counter.
A limit hit returns HTTP 429 with Retry-After: 60 and {"error": {"code": "rate_limit_exceeded", "message": "Rate limit exceeded for your API key — …"}}.
429 vs other errors
| Status | error.code | Source | Meaning and fix |
|---|---|---|---|
429 | rate_limit_exceeded | AnyRouter | Per-key limit hit. Back off Retry-After seconds. |
429 | ip_rate_limit_exceeded | AnyRouter | Anonymous IP hit 300/min. Send an API key. |
403 | upstream_403 | Upstream | Provider denied the call (geo block, policy). Not fixed by backoff. |
401 | upstream_401 | Upstream | BYOK credential rejected. Check your key. |
401 | invalid_api_key | AnyRouter | Your AnyRouter key is wrong or revoked. |
402 | insufficient_balance | AnyRouter | Balance empty. Top up at Credits. |
502 | upstream_5xx | Upstream | Transient provider failure. Retry with jitter. |
error.metadata.upstream_backend names the provider for upstream_* errors.
Retry in your client
Do not treat a 429 as a permanent credential failure: the same key works again after the window.
async function callWithBackoff(body: object): Promise<Response> {
for (let attempt = 0; attempt < 5; attempt++) {
const res = await fetch("https://anyrouter.dev/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${ANYROUTER_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
})
if (res.status !== 429) return res
const wait = Number(res.headers.get("Retry-After") ?? 60)
const jitter = Math.random() * 1000
await new Promise((r) => setTimeout(r, wait * 1000 + jitter))
}
throw new Error("Rate-limit retries exhausted")
}Agent loops count every call: the main completion, one per tool round-trip, and auxiliary calls such as title generation or compaction. A 5-tool task is about 8 requests, so 600/min sustains about 75 such tasks per minute and 150/min about 18. If your loop exceeds its tier, call paid models (600/min), upgrade (Pro gives 400/min on free models; enterprise 2400/min), and cap parallelism with jitter. For more headroom, describe your workload (sustained req/min, burst pattern) at /contact; enterprise tiers are negotiated.
AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer