1. 7API
  2. Docs
  3. Rate limits and request size

Rate limits and request size

Request limits

ScopeLimitWhen exceeded
Account (main key)120 requests per minute and 32 concurrent requests429 rate_limit_error with Retry-After
Each subkey60 requests per minute and 16 concurrent requests429 rate_limit_error with Retry-After
All subkeys of one parent combined600 requests per minute and 128 concurrent requests, separate from the main key's allowance429 rate_limit_error with Retry-After
GET /v1/models, /v1/balance, /v1/usage, /v1/status600 requests per minute per IP address429 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

LimitValue
Request body on generation endpoints25 MB of UTF-8 JSON
Request body on other endpoints1 MB
model string1–128 characters
Default output (max_tokens omitted)16,384 tokens (130,000 for the GLM abliterated models)
Maximum output per request131,072 tokens, capped further by each model's own limit (see models)
Completions per request (n)1–4 on Chat Completions, 1 elsewhere
Context windowPer 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.