cost_micros value, or to decide whether to pin a model id.
Neon 1.1
OpenType serves one model, Neon 1.1. It answers decision runs: typednoul, choice and score questions about a state.
Verdict runs are not served by Neon 1.1. A verdict run (
"kind": "verdict", which is also what you get when kind is missing) answers 503 no_route_available.
Choose a model id
Decision runs take an optionalmodel field.
decision.model, which reads "neon-1.1". In the usage ledger, each model call shows model_id "neon-1.1" and provider "opentype".
Context window
Neon 1.1 reads at most 262,144 tokens (256k) per decision. OpenType estimates a run’s input before it calls the model, at about one token per 4 bytes: the bytes of yourstate divided by 4 and rounded up, plus the bytes of the canonical instructions, questions, draws and think_tokens divided by 4 and rounded up. A decision whose estimate is above 262,144 tokens is refused with 413 input_too_large.
In practice that is about 1 MiB of text for the state and questions together, which fits in the 4 MiB request body. A long read takes longer, so the default deadline of a decision grows with its input; see Limits. To keep runs fast and cheap:
- Send only the fields the questions need, not a whole record.
- Keep
instructionsshort. They are counted once per run, not once per question. - Split a document longer than 256k tokens into several runs.
Idempotency-Key: reusing the old key with a different body can answer 409 idempotency_conflict.
How a run is priced
Every amount in the API is an integer in micro-USD: 1,000,000 micros is $1, 10,000 micros is 1 cent. The price is 42,000 micros per million tokens for input and for output alike, and the two parts are rounded up separately:cost_micros: 19 in the response, next to "usage": {"input_tokens": 412, "output_tokens": 23}. Because each part rounds up, any run that reads and writes at least one token costs at least 2 micros.
The same arithmetic in code, if you want to budget before sending:
Which cost you see
cost_basis on a live response says where cost_micros came from:
cost_basis appears on live responses only; see Runs.
The per-request ceiling
A single run may spend at most 20,000 micro-USD ($0.02). A lower ceiling can apply to your organization, never a higher one;GET /v1/quota reports the one in force as limits.request_spend_ceiling_micros. While a run is in flight, OpenType holds its whole ceiling against your balance. When the run settles, the hold is released and only the actual cost is charged.
Two consequences:
- A run needs $0.02 of available credit to start, even though it usually costs a few hundredths of a cent. Below that,
POST /v1/runsanswers402insufficient_credits. - Parallel runs hold in parallel. Ten runs in flight hold $0.05 between them, until each one settles.
503 budget_exhausted.
Free credit
A new account receives $5 of free credit once its email address is verified, one grant per email address. That is 5,000,000 micros: more than 250,000 runs like the quickstart one, at 19 micros each. See Create an account. After the free credit, you buy credits, from $5 to $1,000 at a time, or turn on auto-recharge.Related
- Credits and billing - buy credits and read your balance and transactions.
- Usage reporting - token and spend totals, per day and per run.
- Spend limits and quotas - cap what your organization can spend in a period.
- Handling insufficient credits - what to do when a run answers 402.
- Limits - every size, token, and spend bound in one table.