Platform

Limits

Ceilings the gateway enforces, and what you get back when you cross one.

Rate limits

FieldTypeDescription
Inference60 / minutePer key, across /v1/chat/completions, /v1/responses, and /v1/messages.
Token counting120 / minute/v1/messages/count_tokens. Free, but not unmetered.
Concurrency32 in flightRequests 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

FieldTypeDescription
Request body20 MBSized for inline base64 images, which inflate about a third on the wire.
Prompt text4,000,000 charactersText across all messages. Returns 413. Sits far above every model's context window, so the model's own limit binds first.
Messages4,096Number 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.