What each field means
The request defines the questions and answer formats. The response returns a separate result for each question. These are the fields you can inspect in the request preview and model response above.
Request fields
model- The model ID. This Playground pins typesafe/jev-1.13 so the version is explicit.
state- The shared facts to evaluate. This form sends your text as state.input.
questions- A map of named questions. This Playground sends one or three in each request.
<question_id>- A name such as action or urgency. Its answer is returned under the same name.
type- The answer format: choice selects an option, score rates ordered levels, and noul evaluates a yes/no question.
instructions- The specific judgment the model should make using the shared state.
criteria- Choice options, ordered Score levels, or the false/true meanings for a Noul question.
Response fields
answers- One typed result per question, keyed by the same question ID.
choice- The selected option key for a Choice question.
probabilities- The probability distribution across Choice options or Score levels; values add up to about 1.
confidence- A separate value derived from the distribution for Choice and Score. It is not the selected option’s probability.
score- A probability-weighted position on your ordered levels. It can fall between two levels.
legend- The Score levels mapped back from their numeric positions to the descriptions you supplied.
noul- The probability of yes, from 0 (no) to 1 (yes). Noul has no separate confidence field.
The questions in a multiple-question case share one state but are evaluated independently. One answer is not fed into another. This Playground caps a run at three questions and counts it as one daily attempt. A correctly shaped answer can still be wrong, so test representative cases before automating an action.
A server-side OpenRouter request
TypeScript · fetch// Run on your server. Keep the API key out of browser code.
const apiKey = process.env.OPENROUTER_API_KEY;
if (!apiKey) throw new Error("Set OPENROUTER_API_KEY");
const response = await fetch("https://openrouter.ai/api/alpha/decisions", {
method: "POST",
headers: {
Authorization: "Bearer " + apiKey,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "typesafe/jev-1.13",
state: {input: "A customer reports a duplicate charge."},
questions: {
team: {
type: "choice",
instructions: "Which team should handle this?",
criteria: {
billing: "Payments and refunds",
technical: "Bugs and integrations"
}
},
urgency: {
type: "score",
instructions: "How urgent is the issue?",
criteria: ["Can wait", "Needs attention today", "Immediate action"]
},
escalate: {
type: "noul",
instructions: "Should a human review this first?",
criteria: {false: "No review needed", true: "Review before acting"}
}
}
})
});
if (!response.ok) throw new Error("Decision request failed");
const {answers} = await response.json();
console.log(answers.team.choice, answers.urgency.score, answers.escalate.noul);
Before using a decision in production
TypeSafe accepts text, JSON objects, or arrays of text as state; this simple form wraps your text under input. Jev does not accept images, audio, or video. Typed output keeps the format predictable, but an individual judgment can still be wrong. Test on your own examples and define when your code should ask for review.