Decisions
What it is
Section titled “What it is”POST /v1/decisions is the endpoint for decision models (System One). Unlike chat models they do not generate text: you send application state and one or more typed questions, and get back typed answers with probabilities your code can branch on directly — no prompt-and-parse step.
It replaces the pattern of asking an LLM a narrow question and extracting a label from its answer: faster, cheaper, more predictable.
Models: typesafe/jev-1.13 (TypeSafe Jev, 32K context) and jaredpalmer/kev-4b (Jared Palmer Kev 4B, a compact open Apache-2.0 alternative, 8K context). Both share the same /v1/systemone contract.
Three primitives
Section titled “Three primitives”| Primitive | Question | What comes back |
|---|---|---|
noul |
Does this condition hold? | Probability of yes (0…1) |
choice |
Which one of these options? | The selected option, a probability per option, confidence |
score |
Where on an ordered scale? | Probability-weighted position, per-level probabilities, confidence |
A single request may carry any number of questions of mixed types — one answer per question.
Request
Section titled “Request”{ "model": "typesafe/jev-1.13", "state": "…context: string, object or array…", "questions": { "is_bug": { "type": "noul", "instructions": "…", "criteria": { "true": "…", "false": "…" } }, "team": { "type": "choice", "instructions": "…", "criteria": { "billing": "…", "tech": "…" } }, "urgency": { "type": "score", "instructions": "…", "criteria": ["…", "…", "…"] } }, "session_id": "optional — request grouping", "user": "optional — end-user identifier"}Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
model |
string | yes | typesafe/jev-1.13 (aliases jev, jev-1.13) or jaredpalmer/kev-4b (aliases kev, kev-4b) |
state |
string | object | array | yes | Context to evaluate: ticket text, a state object, an array of related data |
questions |
object | yes | Map “name → question”. The name becomes the key in answers |
session_id |
string | no | Grouping of related requests (workflow, conversation) — up to 256 chars |
user |
string | no | End-user identifier — up to 256 chars |
Questions
Section titled “Questions”Common fields: type (required) and instructions (required) — the question in words.
noul—criteriawithtrueandfalsekeys (both required): the pair of descriptions defines the boundary of the condition.choice—criteriaas an “option → description” object (required). The answer carries the pick and the full distribution.score—criteriaas an array of ordered levels (required, ≥1). Level 0 is the low end of the scale.
Criteria and instructions accept structured guidance (objects/arrays), not only strings.
Response
Section titled “Response”{ "id": "gen-dec-…", "model": "typesafe/jev-1.13-20260917", "provider": "TypeSafe", "answers": { "is_bug": { "type": "noul", "noul": 0.96 }, "team": { "type": "choice", "choice": "payments", "confidence": 0.75, "probabilities": { "account": 0, "frontend": 0.16, "payments": 0.84 } }, "urgency": { "type": "score", "score": 1.99, "confidence": 0.99, "probabilities": { "0": 0, "1": 0.01, "2": 0.99 }, "legend": { "0": "Can wait", "1": "This week", "2": "Blocking revenue" } } }, "usage": { "cost": 0.00002, "cost_rub": "0.0023", "billing_source": "openrouter", "input_tokens": 476, "output_tokens": 70 }}noul→noul: probability of yes.choice→choice(the pick),probabilitiesper option,confidence.score→score(weighted position 0…N−1),probabilitiesper level,legendmapping indexes to your wording,confidence.usage.cost— the request cost in USD (as on other endpoints),cost_rub— the charge in rubles.
Pricing and billing
Section titled “Pricing and billing”Only input tokens are billed (state plus questions) at the model’s catalog price; output tokens are free. A typical request (~500 tokens) costs a fraction of a cent. Charging follows the actual usage.cost from the response.
Examples
Section titled “Examples”curl https://api.mixen.ai/v1/decisions \ -H "Authorization: Bearer $MIXEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "typesafe/jev-1.13", "state": "My checkout page shows a blank screen after I click Pay. Tried two browsers.", "questions": { "is_bug": { "type": "noul", "instructions": "Is the customer reporting a software defect?", "criteria": { "true": "Describes broken or unexpected product behavior.", "false": "Asks a question or requests a feature." } }, "team": { "type": "choice", "instructions": "Which team should own this ticket?", "criteria": { "payments": "Checkout, billing, payment processing.", "frontend": "Rendering, layout, browser compatibility." } }, "urgency": { "type": "score", "instructions": "How urgent is this ticket?", "criteria": ["Can wait for the next release", "Should be fixed this week", "Blocking revenue right now"] } } }'import requests
r = requests.post( "https://api.mixen.ai/v1/decisions", headers={"Authorization": f"Bearer {KEY}"}, json={ "model": "typesafe/jev-1.13", "state": "Task: clean up inactive accounts. Proposed tool call: delete_rows(...)", "questions": { "safe_to_run": { "type": "noul", "instructions": "Is this action safe to run without a human approving it first?", "criteria": { "true": "Reversible or low-impact, clearly within the task.", "false": "Destructive, irreversible, or broader than the task." }, } }, }, timeout=60,)noul = r.json()["answers"]["safe_to_run"]["noul"]if noul < 0.8: escalate_to_human()const r = await fetch('https://api.mixen.ai/v1/decisions', { method: 'POST', headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ model: 'typesafe/jev-1.13', state: { channel: '#support', message: 'Help! Payouts failing for 3 days.' }, questions: { escalate: { type: 'noul', instructions: 'Does this message convey urgency?', criteria: { true: 'Explicitly time-sensitive', false: 'No urgency expressed' }, }, }, }),});const { answers } = await r.json();if (answers.escalate.noul > 0.8) notifyOnCall();Patterns
Section titled “Patterns”- Routing — which team/queue owns an incoming item.
- Agent gating — is a tool call safe (reversible? within scope?): run, refuse, or ask a human by a
noulthreshold. - Classification and tagging — one category plus any number of binary tags in a single request.
- Cascades — draft with a cheap model, verify against context with a decision model, escalate to an expensive one only on failed checks.
Pick thresholds from confidence/probabilities, not just the top answer: low confidence is the signal to hand the case to a human or re-ask.
Limitations
Section titled “Limitations”- The model does not generate text and does not explain its decisions — probabilities only. Need a rationale? Ask a chat model afterwards.
- Context is per-model: 32K for Jev, 8K for Kev 4B (
stateplus questions). - Errors are standard platform codes:
400(invalid parameters, includingcriteriaerrors),402,404 model_not_found,429,502(upstream failure).