Create a run
Submits a run and returns its answer. The call is synchronous: it returns once the run has settled. Requires runs_write.
Neon 1.1 serves decision runs ("kind": "decision"), with up to 262,144 input tokens. A verdict run currently answers 503 no_route_available.
Idempotency-Key is required. Replaying a key with the same body returns the stored run with replayed: true and never charges again: 200 when the stored run is terminal (a failed run replays as 200 with state: "failed"), 202 when it is still pending. The same key with a different body is 409 idempotency_conflict. Keys are scoped to your organization and never expire. After a 5xx or 504, retry with a new key.
While it runs, a run holds its whole spend ceiling (at most 20,000 micro-USD) against your credit and quota; settlement charges the actual cost. See Errors for every refusal.
The response carries a Server-Timing header with the time spent per phase, in milliseconds: admit;dur=…, upstream;dur=…, gateway;dur=…, total;dur=…. upstream is the model call; gateway is everything else.
Authorizations
An API key (otsk_ + 64 hex) or a console session token.
Headers
1 to 255 bytes of visible ASCII text, unique per logical request. Reuse it only to retry the same body.
Body
A run. kind selects a decision (state plus questions) or a verdict (messages plus schema), and defaults to verdict. max_output_tokens is required on every run. Unknown fields are refused, and a field that belongs to the other kind is 400 invalid_body.
Required. Output tokens the run may generate, greater than 0. Counts toward the token quota estimate.
x >= 0decision or verdict. Defaults to verdict, so send decision explicitly for a decision run.
verdict, decision Verdict runs only, and required for them. At least one prompt turn.
Verdict runs only, and required for them. The JSON Schema the verdict must satisfy: an object of at most 32 KiB, nesting depth 12, 64 subschemas and 512 properties, pattern values of at most 256 characters, and only local # references. Out of bounds is 400 invalid_verdict_schema.
Decision runs only, and required for them. What is being decided about: any JSON value. A string is sent as-is; anything else as its JSON text.
Decision runs only. Context that applies to every question.
Decision runs only, and required for them. 1 to 64 questions keyed by your own ids. An id must be non-empty and must not contain : or a newline. Out of bounds is 400 invalid_decision_questions.
Decision runs only. Independent reads to average, 1 to 8. Defaults to 1.
x >= 0Decision runs only. Tokens the model may think before answering, 0 to 4096. Defaults to 0. The thought text is never returned.
x >= 0Decision runs only. neon-1.1, or neon-latest, which resolves to neon-1.1. Any other value is 400 unknown_model.
"neon-1.1"
Optional routing hints. At most 7, no duplicates. Hints can only narrow routing. Hint errors are reported as invalid_verdict_schema on either kind.
A routing capability. A hint can only narrow the routes considered.
chat, reasoning, tools, vision, streaming, embedding, structured_read Time budget in milliseconds. A verdict run defaults to 30,000 and is clamped to 1 to 120,000. A decision run defaults to 30,000 plus 120,000 per 262,144 input tokens and is clamped to 1 to 150,000. Past it the run is 504 deadline_exceeded.
x >= 0Decision runs only. Your question order; it must name exactly the keys of questions. Defaults to sorted key order.
Response
The settled run: a fresh run, or the replay of a terminal run (replayed: true).
A run. A completed run carries verdict or decision, never both. Absent optional fields are omitted, not null. Stored reads (replays, retrieve, stream, list rows) omit cost_basis and schema_enforcement; list rows also omit the answer, usage and cost.
run_ followed by 32 hex characters.
Which kind of answer this run produces: look at verdict or at decision.
verdict, decision pending, running, completed, failed 64-character hex SHA-256 of the normalized input, kind and contract.
true whenever the body came from storage: every replay, retrieve, stream and list row. A replay is never charged again.
Completed verdict runs: your JSON document, validated against your schema.
The decision's answer set. Present on a completed decision run.
Tokens the run used.
x >= 0Whether cost_micros was reported by the model service or estimated from the price list. Present exactly when cost_micros is.
provider_reported, estimated What constrained the verdict. Present on a fresh verdict run; absent on a replay and on a list row.
unconstrained, requested, forced, enforced