Limits
Size, count and request-shape limits for the decision API, and what happens when you go over.
Requests over a limit are refused, never silently cut short. The refusal is an error that names the limit.
Context
| Limit | Value | If exceeded |
|---|---|---|
| Tokens for the state plus the longest question (per question row) | 32,768 | 400 max_tokens_exceeded |
| Tokens for the state plus all questions (per request) | 65,536 | 400 max_tokens_exceeded |
| Number of questions (System One) | No fixed maximum. Only the token limits apply. | |
Number of questions (/v1/decisions) | 1 to 400 | 400 |
The limits are published as "32k" and "64k". These are the defaults; GET /v1/models with the Sieve-Extras: true header reports each model's limits under context. Image tokens count toward both limits.
Long context. Send TypeSafe-Danger-Zone-Long-Context: true only for a model whose Sieve-Extras: true catalogue entry exposes a context.long_context value. The backend uses that model-specific value for both limits; it does not promise one global long-context number. A model without long-context support continues to use its normal limits.
Options and levels
| Limit | Value |
|---|---|
choice options | 1 to 255 (422 outside this range) |
score levels | 1 to 10 (422 outside this range) |
/v1/decisions choices | 2 to 255, each unique |
/v1/decisions score levels | 2 to 10 |
Request body
| Rule | Limit | If broken |
|---|---|---|
| Body size | 32 MiB (33,554,432 bytes), counted both as received and after decompression | 413 |
| Text encoding | UTF-8 JSON with no byte-order mark | 400 |
| Nesting | At most 64 levels of objects and arrays inside each of state, each question's instructions, and each question's criteria | 400 |
| Numbers | Finite only. NaN, Infinity, -Infinity and values that overflow (such as 1e400) are refused | 400 |
| Content-Encoding | One layer of gzip, x-gzip or zstd. A zstd window may be up to 8 MiB | 415 (400 if the data is malformed) |
| Content-Type | application/json, or multipart/form-data when you send images | 415 |
| Unknown top-level fields on System One | Ignored, not echoed |
Nesting is counted inside each field, not over the whole body. A state that is 64 arrays deep is valid.
Compression
Send Content-Encoding: zstd or gzip for large bodies. The TypeSafe SDKs compress any body of 1 KiB or more with zstd by default.
- Python SDK: zstd is built in on Python 3.14. On 3.13 and older install the extra,
pip install "typesafe-sdk[zstd]". Without it the SDK sends plain bodies. - JavaScript SDK: zstd needs Node.js 22.15 or newer. Older runtimes send plain bodies.
- LiteLLM proxy cannot read zstd request bodies and answers 500. Behind LiteLLM, turn compression off:
TypeSafeClient(compression=False)in Python,new TypeSafeClient({ compression: false })in JavaScript.
Images (not at launch)
Images and box questions need a vision model and the header TypeSafe-Danger-Zone-Images: true. Until then, requests with images or box return 400. The limits are:
| Limit | Value | If exceeded |
|---|---|---|
| Format | PNG or JPEG, still images only | 400 |
| File size | 16 MiB per image, after base64 decoding | 413 |
| Width and height | 280 to 1568 px each | Too small 400, too large 413 |
| Total pixels | 78,400 to 2,458,624 | Too small 400, too large 413 |
| All images together | 32 MiB after processing | 413 |
Images per request on /v1/decisions | 128 | 400 |
Rate limits
Limits are set per organisation and per model, in requests per second and input tokens per second. A key can have tighter limits than its organisation, never looser. There can also be a daily input-token limit (reset at 00:00 UTC) and a cap on requests in flight. New organisations start with a lower daily allowance that grows with steady use.
When you hit a limit the API returns 429: wait for retry-after and try again. A single request that can never fit returns 400 max_tokens_exceeded instead: for example, more compute (state tokens counted once per question, plus question tokens) than your configured per-request cap, more input tokens than a per-second burst or daily limit, or more questions than your configured maximum. Split such a request. Overload returns 529 (System One) or 503 (/v1/decisions). See Errors for each body. The console's Limits page shows the limits that apply to you.
Default numbers are not published yet
The console's Limits page shows the exact limits for your organisation and lets you request an increase. In code, read the x-ratelimit-* headers on each response and honour retry-after. See Errors.
Next steps
Last updated