input_too_large means the input of a run is too large to process, measured in estimated tokens rather than bytes. Read this page if you send long tickets, documents or states in decision runs.
What happened
Route:POST /v1/runs.
OpenType estimates the input size of every run before it calls the model:
system and messages for a verdict run, or state for a decision run. The contract is the verdict schema, or the decision instructions, questions, draws and think_tokens, in canonical JSON. The estimate is refused in two places:
For Neon 1.1 decision runs both limits are 262,144 tokens (256k), so the admission check is the one you meet.
The admission message names the estimate, as in the example below. Branch on
code, not on the message.
How to fix
- Estimate before you send: count the UTF-8 bytes of the prompt and of the contract, divide each by 4 and round up. Keep a decision run’s total at or under 262,144 tokens.
- Send only what the questions need. Drop unused fields from
state, strip markup and signatures, and truncate long threads to the latest messages. - Shorten
instructionsand question text, or split a large question set across several runs. - Retry with the right key:
- If the input was refused at admission (over the ceiling for its kind), the key is still free; reuse it.
- Otherwise, use a new key. A replay of the old key returns
202with thependingrun instead of running again.
Example
Related
- Models and pricing - Neon 1.1’s context and prices.
- Limits - the token ceiling and the context limit with every other limit.
- Idempotency - why a run stuck in
pendingneeds a new key. - body_too_large - the body is over 4 MiB before any token count.
- Problem codes - every code, its status, and whether a retry can help.