Guides
Rate Limits
Per-key request and token limits, and how to respond when you hit one.
Rate limits protect the gateway for everyone, and they apply per key. Exceeding a limit returns 429 with a Retry-After header telling you how long to wait.
Default limits
| Plan | Requests/min | Tokens/min | Concurrent streams |
|---|---|---|---|
| Free | 60 | 40k | 4 |
| Pro | 600 | 400k | 16 |
| Enterprise | Custom | Custom | Custom |
Placeholders
Exact numbers change as the beta benchmarks settle — these are the current defaults, not a commitment.
Seeing your limits
Every response carries rate limit headers. No extra call needed:
| Header | Meaning |
|---|---|
| x-ratelimit-limit | Requests allowed per window |
| x-ratelimit-remaining | Requests left in this window |
| x-ratelimit-reset | Seconds until the window resets |
| retry-after | On 429, seconds to wait |
Handling a 429
async function callWithBackoff(fn) {
for (let i = 0; ; i++) {
try {
return await fn();
} catch (err) {
if (err.status !== 429) throw err;
const retryAfter = Number(err.headers.get("retry-after")) ?? 2 ** i;
await sleep(retryAfter * 1000);
}
}
}What communities share
- Token limits are shared across streaming and non-streaming calls.
- Streaming consumes tokens as they are generated.
- 429s are retryable — the Retries guide shows the pattern.