POST /api/alpha/decisions) allows applications to query specialized System One decision models (such as TypeSafe Jev, Cloudflare Clef, Inception Mercury Decide, and Liquid D1) with application state and one or more typed questions. Instead of generating conversational text that requires prompt engineering and regex extraction, decision models return deterministic, typed answers with calibrated probability distributions.
When to use Decisions
OpenRouter offers several ways to obtain structured outputs. Choose the API that best matches your workflow:
Decisions models do not emit conversational text, explanations, or free-form prose. Token accounting and billing depend on the model and provider pricing strategy: many System One decision endpoints bill primarily for input tokens (with zero or minimal output tokens), while select endpoints use per-request or standard token pricing. Prompt caching discounts apply where supported and are reported under
input_tokens_details.cached_tokens. The cost field in the response usage object always reports the exact credits charged.
Discovering Decisions models
To list available Decisions models, query the Models API withoutput_modalities=decisions:
typesafe/jev-1.14(and~typesafe/jev-latest): High-accuracy System One model supporting text and images across all question types including bounding-box localization (box).cloudflare/clef-flash: Fast, low-latency decision model for high-throughput routing and filtering.inception/mercury-decide: Fast classification model optimized for high-volume text decision pipelines.liquid/d1: High-throughput decision model for automated triage and gating.
Quickstart
Send an application context string instate along with one or more typed questions under questions:
Response example
TypeScript integration
Python integration
Question primitives
The Decisions API supports four question primitives:1. noul (Binary evaluation)
Evaluates whether a condition holds. Returns noul (a continuous float from 0.0 to 1.0 representing the probability of true) and a confidence metric.
true and false, supply a criteria object with true and false keys:
2. choice (Multi-class classification)
Selects the best matching category from a defined set of options. The criteria object maps each option key to a descriptive definition:
choice: The winning key (highest probability).probabilities: A map of probabilities across all keys, summing to1.0.confidence: The confidence score of the winning pick.
3. score (Ordered scale evaluation)
Evaluates where input falls along an ordered gradient. The criteria array specifies discrete ordered levels from minimum to maximum:
score (interpolated across the 0-indexed scale from 0.0 to N-1), plus discrete probabilities for each bucket index. For example, a 3-criteria question on a 0–2 scale with probabilities { "0": 0.01, "1": 0.14, "2": 0.85 } produces an expected continuous score of 1.84.
4. box (Visual object localization)
Supported by typesafe/jev-1.14 and ~typesafe/jev-latest. Finds a target object in an image supplied in state and returns its bounding box:
(0, 0):
Multimodal inputs: state parts and assets
Decisions models accept multimodal inputs via two patterns:
- Inline
stateparts: Supplystateas an array containing strings and content parts (image_url,input_audio,video_url). Supported parts vary by provider adapter. - Re-usable
assetsmap: Upload images once under the top-levelassetsobject keyed by an identifier (e.g."receipt_front"). Reference the key instateor questions.
Request schema reference
Handling provider refusals
If a provider declines to answer an individual question (for instance, due to content safety policy), the response returnstype: "refusal" for that question while successfully resolving all other questions in the same request:
type before reading numeric scores or probability maps in production code. Treat a refusal, a question key missing from answers, or an unexpected type as “not answered”, never as a safe or negative verdict: when the decision gates something sensitive, fail closed and route the input to a human.