Try it
Copy the code ↓- Data source
- Decision schema
- Model inference
- Structured result
2 Decision schema 3 typed questions
intentchoicecheck_balanceapprove_transfersupportconfidence_bandscorelowmediumhighirreversiblenoulprobability 0–1
3 Model inference typesafe/jev-1.13
Waiting for a run.
4 Structured result
Raw JSON
Run the demo to see the JSON answers, the highlighted pick and the final action.
FLATKEY_API_KEY and run.curl -sS https://router.flatkey.ai/api/alpha/decisions \
-H "Authorization: Bearer $FLATKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"state": "Channel: banking bot\nUser message: \"How do I approve the ¥50,000 transfer I submitted earlier?\"\nContext: This is a how-to question about the approval UI, not a request to approve the transfer now. Pending transfer #T-8841 is still awaiting confirmation.\n\nTask: intent (check_balance / approve_transfer / support), confidence_band, irreversible.",
"questions": {
"intent": {
"type": "choice",
"instructions": "What is the user trying to do right now? Prefer support when the message asks how to do something, asks for help, or does not clearly request a pending action. Prefer approve_transfer only when the user is clearly approving a pending transfer now—not asking how to approve one. Prefer check_balance for balance or account-status reads.",
"criteria": {
"check_balance": "The user wants to see an account balance or a read-only status that does not move money",
"approve_transfer": "The user clearly wants to approve a pending transfer or withdrawal now; exclude how-to questions about approving transfers",
"support": "A how-to question, troubleshooting, or other help request—including \"how do I approve a transfer?\""
}
},
"confidence_band": {
"type": "score",
"instructions": "How concentrated is the intent Choice on a single option—proxy for Jev confidence. High means one option dominates; low means the probabilities are split or the message is underspecified.",
"criteria": [
"low",
"medium",
"high"
]
},
"irreversible": {
"type": "noul",
"instructions": "Acting on the top intent would move money or otherwise be hard to undo (approve a transfer, send funds, change irrevocable settings). How-to and balance-check intents are not irreversible."
}
}
}'// Node.js 18+ (built-in fetch). Run: FLATKEY_API_KEY=... node jev.mjs
const body = {
"model": "typesafe/jev-1.13",
"state": "Channel: banking bot\nUser message: \"How do I approve the ¥50,000 transfer I submitted earlier?\"\nContext: This is a how-to question about the approval UI, not a request to approve the transfer now. Pending transfer #T-8841 is still awaiting confirmation.\n\nTask: intent (check_balance / approve_transfer / support), confidence_band, irreversible.",
"questions": {
"intent": {
"type": "choice",
"instructions": "What is the user trying to do right now? Prefer support when the message asks how to do something, asks for help, or does not clearly request a pending action. Prefer approve_transfer only when the user is clearly approving a pending transfer now—not asking how to approve one. Prefer check_balance for balance or account-status reads.",
"criteria": {
"check_balance": "The user wants to see an account balance or a read-only status that does not move money",
"approve_transfer": "The user clearly wants to approve a pending transfer or withdrawal now; exclude how-to questions about approving transfers",
"support": "A how-to question, troubleshooting, or other help request—including \"how do I approve a transfer?\""
}
},
"confidence_band": {
"type": "score",
"instructions": "How concentrated is the intent Choice on a single option—proxy for Jev confidence. High means one option dominates; low means the probabilities are split or the message is underspecified.",
"criteria": [
"low",
"medium",
"high"
]
},
"irreversible": {
"type": "noul",
"instructions": "Acting on the top intent would move money or otherwise be hard to undo (approve a transfer, send funds, change irrevocable settings). How-to and balance-check intents are not irreversible."
}
}
};
const res = await fetch("https://router.flatkey.ai/api/alpha/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FLATKEY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`Jev request failed: ${res.status} ${await res.text()}`);
const { answers, usage } = await res.json();
console.log(JSON.stringify(answers, null, 2), usage);# Python 3.8+ (pip install requests). Run: FLATKEY_API_KEY=... python jev.py
import json, os, requests
body = json.loads(r"""{
"model": "typesafe/jev-1.13",
"state": "Channel: banking bot\nUser message: \"How do I approve the ¥50,000 transfer I submitted earlier?\"\nContext: This is a how-to question about the approval UI, not a request to approve the transfer now. Pending transfer #T-8841 is still awaiting confirmation.\n\nTask: intent (check_balance / approve_transfer / support), confidence_band, irreversible.",
"questions": {
"intent": {
"type": "choice",
"instructions": "What is the user trying to do right now? Prefer support when the message asks how to do something, asks for help, or does not clearly request a pending action. Prefer approve_transfer only when the user is clearly approving a pending transfer now—not asking how to approve one. Prefer check_balance for balance or account-status reads.",
"criteria": {
"check_balance": "The user wants to see an account balance or a read-only status that does not move money",
"approve_transfer": "The user clearly wants to approve a pending transfer or withdrawal now; exclude how-to questions about approving transfers",
"support": "A how-to question, troubleshooting, or other help request—including \"how do I approve a transfer?\""
}
},
"confidence_band": {
"type": "score",
"instructions": "How concentrated is the intent Choice on a single option—proxy for Jev confidence. High means one option dominates; low means the probabilities are split or the message is underspecified.",
"criteria": [
"low",
"medium",
"high"
]
},
"irreversible": {
"type": "noul",
"instructions": "Acting on the top intent would move money or otherwise be hard to undo (approve a transfer, send funds, change irrevocable settings). How-to and balance-check intents are not irreversible."
}
}
}""")
res = requests.post(
"https://router.flatkey.ai/api/alpha/decisions",
headers={"Authorization": f"Bearer {os.environ['FLATKEY_API_KEY']}"},
json=body,
timeout=60,
)
res.raise_for_status()
data = res.json()
print(json.dumps(data["answers"], indent=2), data.get("usage"))
No Flatkey key yet? Get one for Jev 1.13 →
About this use case

Who / when
Audience
- builders wiring banking, support, or ops bots that must decide when to act without a human
- teams that already have a typed Choice and need a confidence gate before side effects
- product owners who learned that a 0.98 confidence can still misread a how-to as an approval
Triggers
- an intent Choice returns approve_transfer and you must decide whether to execute, confirm, or escalate
- money moves or other hard-to-undo actions need a higher bar than read-only replies
- ambiguous messages like "please handle that thing" sit near the threshold and flip between bands
- you need one policy that maps confidence × irreversibility into three harness routes
The workflow
- 01User messageIntent text + contextInput
- 02Intent Choicebalance / transfer / supportJev
- 03Confidence lamplow / medium / high + irreversibleJev
- 04Code gateAuto, confirm, or escalateYour code
Question shape
{
"intent": {
"type": "choice",
"instructions": "What is the user trying to do right now? Prefer support when the message asks how to do something, asks for help, or does not clearly request a pending action. Prefer approve_transfer only when the user is clearly approving a pending transfer now—not asking how to approve one. Prefer check_balance for balance or account-status reads.",
"criteria": {
"check_balance": "The user wants to see an account balance or a read-only status that does not move money",
"approve_transfer": "The user clearly wants to approve a pending transfer or withdrawal now; exclude how-to questions about approving transfers",
"support": "A how-to question, troubleshooting, or other help request—including \"how do I approve a transfer?\""
}
},
"confidence_band": {
"type": "score",
"instructions": "How concentrated is the intent Choice on a single option—proxy for Jev confidence. High means one option dominates; low means the probabilities are split or the message is underspecified.",
"criteria": [
"low",
"medium",
"high"
]
},
"irreversible": {
"type": "noul",
"instructions": "Acting on the top intent would move money or otherwise be hard to undo (approve a transfer, send funds, change irrevocable settings). How-to and balance-check intents are not irreversible."
}
}Gate policy
≥ 0.90
Auto-act only when confidence_band is high and irreversible is false (e.g. check_balance or a clear support FAQ). If irreversible is true—even at high confidence—confirm_with_user before any money move. Never auto-approve a transfer from confidence alone.
0.65–0.90
confirm_with_user: show the top intent and ask the user to confirm before acting. Escalate when irreversible is true and confidence_band is only medium.
< 0.65
escalate_to_human (or ask a clarifying question). Log probabilities; do not execute side effects from a dim confidence lamp.
Failure modes
Pre-launch checks before you trust auto-routing:
- Auto-approving a transfer because confidence hit 0.98 on a how-to that only mentioned "approve" and "transfer";
- Using one global threshold for balance checks and money moves—read-only mistakes are cheap; transfer mistakes are not;
- Treating confidence as P(correct) instead of concentration of probability mass on one option;
- Ignoring the irreversible flag and auto-acting whenever the lamp is bright;
- Letting Jev move money itself—route choice only; execution and confirmation UI stay in the harness;
FAQ
Is a confidence of 0.98 a 98% chance the answer is correct?
No. Confidence measures how concentrated the probability mass is on one option, not whether that option is right. A how-to question about approving a transfer can still score ~0.98 on approve_transfer when criteria are written too loosely. Treat confidence as a routing signal, and keep confirmations on irreversible actions even when the lamp is bright.
Why not use one threshold for every action?
Mistake cost differs. Showing the wrong balance is cheap to undo; approving the wrong transfer moves money. Confidence-gated routing should raise the bar—or force confirm_with_user—when irreversible is true, even at high confidence.
What does the Flatkey call look like?
POST https://router.flatkey.ai/api/alpha/decisions with Authorization: Bearer …, Content-Type: application/json, and a body of state, model (typesafe/jev-1.13), and questions (choice / score / noul). This is not an OpenAI-compatible /v1 chat endpoint.
Can I bring my own API key?
Yes. Try the free demo above without signing in. To run it live on your own text, sign in with Google and connect a Flatkey or OpenRouter key (a quick test call runs when you save it). Manage or delete it anytime under Dashboard → BYOK. Keys are stored encrypted on the server, used only for runs you trigger, and never sent back to the browser. Need a Flatkey key? Get one for Jev 1.13 on Flatkey.
Is this the official TypeSafe Jev product page?
No. jev-llm.com is an independent research and practice site. Verify pricing, models and terms at the original TypeSafe sources.
Sources
AIに問い合わせや申し込みの仕分けを任せはじめると、次にぶつかるのが「この判定を、そのまま実行していいのか」という迷いです。アプリのAIが「この人は送金を承認したがっています」と返してきたとき、自信の数字が0.9なら任せていいのか、0.6なら人が見るべきなのか。
— @engineer_num1 View the post on X →
Wire this gate with your own key
Bring your own key through Flatkey / OpenRouter. Keep exact checks in code.