API docs

Limits

The values below are the hosted service's. Limits are set by the active deployment configuration; the API error text reports the current value. See errors for status codes and the migration checklist for request sizing.

state_too_long

Each question has its own state room: about 437–478 tokens with the English model's 512-token sequence, or 1975–2014 with the multilingual model’s 2048-token sequence. Shorten the state or that question's instructions/options. See models.

instructions_too_long

Reduce the question's instructions or options.

request_too_large

Split the request. Processed tokens are questions multiplied by the longest sequence; the default ceiling is 3,500 for English or 6,000 for multilingual. The API error reports the selected worker's cap.

options_too_long

Shorten option names and descriptions. An option has a 48-token budget.

too_many_questions

Split the call; the maximum is 32 questions per call.

rate_limited

Each account can send a burst of 40 requests at once; after that the allowance refills at 4 per second, which is 240 requests per minute. Every request with a valid API key counts, including requests rejected as invalid (422), so fix a failing request before retrying it in a loop. Before the key is checked, each IP address may send up to 20 requests per second. Both limits answer 429 rate_limited; the error text names the limit, and Retry-After (seconds) and retry-after-ms say when to retry. Honor them.

too_many_inflight

Wait for a running call to finish. The account cap is 4 concurrent calls.

quota_tokens

Your account's free monthly allowance is used up. By default that is an allowance of 500,000 billed input tokens a month; the error text names your account's own allowance. See usage for the UTC reset time.

The allowance is per account, shared by all its API keys. The API keys page shows each key's requests and billed input tokens for the current UTC month.

quota_compute

The internal compute allowance is exhausted. See usage for the UTC reset time.

Next: Errors