Platform
Limits
Ceilings the gateway enforces, and what you get back when you cross one.
Rate limits
| Field | Type | Description |
|---|---|---|
Inference | 60 / minute | Per key, across /v1/chat/completions, /v1/responses, and /v1/messages. |
Token counting | 120 / minute | /v1/messages/count_tokens. Free, but not unmetered. |
Concurrency | 32 in flight | Requests reserved or running at the same time, per account. |
Crossing a rate limit returns 429. Retry with backoff rather than immediately — a tight retry loop against a rate limit just extends the window.
Size limits
| Field | Type | Description |
|---|---|---|
Request body | 20 MB | Sized for inline base64 images, which inflate about a third on the wire. |
Prompt text | 4,000,000 characters | Text across all messages. Returns 413. Sits far above every model's context window, so the model's own limit binds first. |
Messages | 4,096 | Number of messages in one request. Returns 413. |
Output limits
max_tokens is enforced. When generation reaches it, the response stops and finish_reason is length (Anthropic: stop_reason: "max_tokens"). Omitting it applies a default ceiling of 16,384 output tokens.
Tool-call responses are exempt: clipping structured JSON would corrupt it rather than shorten it, so tool calls are returned whole.
Key-level limits
A key can carry its own monthly budget and its own model allowlist. Those are set when you create the key and are enforced ahead of the account-wide limits above — a key over budget returns 429 while your other keys keep working. See Authentication.
Timeouts
A request may run for up to 10 minutes. An upstream that stops responding is abandoned after that, the call fails, and the wallet hold is released in full.