Skip to main content
Neon 1.1 does not serve verdict runs. Today every verdict run is refused with 503 no_route_available. To get a typed answer now, use a decision run: most extraction and classification tasks fit a set of choice, noul and score questions.
A verdict run sends a conversation and a JSON Schema, and returns one JSON document that has passed that schema. This page documents the contract, so you know which fields exist, which bounds a schema must stay within, and which errors a verdict run can return. It is for developers who plan for verdict runs, or who received a no_route_available and want to know why.

Decision or verdict

Because kind defaults to "verdict", a decision request that forgets "kind": "decision" is treated as a verdict run. It is then refused with 400 invalid_body, for example state is only valid on a decision run.

The request

The same headers as every run apply: Authorization: Bearer $OPENTYPE_API_KEY with the runs_write scope, Content-Type: application/json, and an Idempotency-Key of 1 to 255 bytes of visible text. Decision fields are refused on a verdict run with 400 invalid_body: state, questions, instructions, draws, think_tokens and question_order each give <field> is only valid on a decision run.
intent.json
Today the response is:

The response

When a route can serve it, a completed verdict run returns the run fields plus verdict, the validated document. This example shows the shape, not a response you can get today:

schema_enforcement

A live verdict response says how the schema bound the answer. Every returned verdict passed validation against your schema, whatever this value is. schema_enforcement and cost_basis appear only on the live response to POST /v1/runs. A stored copy of the run, from GET /v1/runs/{run_id}, the stream or a replayed Idempotency-Key, omits both.

Schema bounds

A schema is checked before any model call. One that breaks a bound is refused with 400 invalid_verdict_schema, and nothing is charged. The message is the verdict schema is not acceptable: followed by the reason:
  • schema must be a JSON object
  • schema is larger than the permitted size
  • schema nests deeper than permitted
  • schema nests more subschemas than permitted
  • schema declares more properties than permitted
  • schema $ref must be a local pointer beginning with #
  • schema $ref must be a string
  • schema $ref must point at a subschema within the same schema
  • schema uses a keyword whose references cannot be bounded: $id, id, $anchor, $dynamicAnchor, $dynamicRef, $recursiveAnchor, $recursiveRef
  • schema uses an unrecognised keyword with a structured value
  • schema pattern is longer than permitted
  • schema is not a valid JSON Schema
capability_hint mistakes use the same code: too many capability hints, duplicate capability hints, too many capability needs. They do so on decision runs too.

Attempts and verdict_schema_violation

A verdict run gets at most two model calls: the answer, and one repair when the answer does not pass the schema. When the second attempt still breaks the schema, or does not produce a document at all, the run fails with 503 verdict_schema_violation. The error carries violations, up to 10 JSON Pointers into the rejected document:
  • Only this code carries violations. The field is absent when the model returned no document.
  • The attempts that ran were model calls, so the run is settled failed and charged what they cost.
  • A replay of the same Idempotency-Key returns that failed run with 200 and "state": "failed". It does not run again. To try again, loosen the schema, or send the same body with a new key.

What goes wrong

After a 503 no_route_available, a replay with the same Idempotency-Key returns 202 with the stored run still pending. It is never picked up again, so do not poll it: send any later attempt with a new key.