Rate limits and request size
Request limits
| Scope | Limit | When exceeded |
|---|---|---|
| Account (main key) | 120 requests per minute and 32 concurrent requests | 429 rate_limit_error with Retry-After |
| Each subkey | 60 requests per minute and 16 concurrent requests | 429 rate_limit_error with Retry-After |
| All subkeys of one parent combined | 600 requests per minute and 128 concurrent requests, separate from the main key's allowance | 429 rate_limit_error with Retry-After |
GET /v1/models, /v1/balance, /v1/usage, /v1/status | 600 requests per minute per IP address | 429 with Retry-After: 60 |
The per-minute window is fixed and resets every 60 seconds. A request counts toward the concurrency limit from the time it's accepted until its response, or stream, finishes.
If you need higher limits for production workloads, contact support with your expected request rate.
Size limits
| Limit | Value |
|---|---|
| Request body on generation endpoints | 25 MB of UTF-8 JSON |
| Request body on other endpoints | 1 MB |
model string | 1–128 characters |
Default output (max_tokens omitted) | 16,384 tokens (130,000 for the GLM abliterated models) |
| Maximum output per request | 131,072 tokens, capped further by each model's own limit (see models) |
Completions per request (n) | 1–4 on Chat Completions, 1 elsewhere |
| Context window | Per model, up to 1,050,000 tokens. See models. |
Balance holds
When a request starts, the gateway reserves its worst-case cost from your balance: the estimated input plus the full output limit. When the request finishes, it charges the actual usage and releases the rest. A huge max_tokens on a small balance can therefore return 402 even when the real cost would have fit. Set max_tokens to what you actually need.
