Guides / illustrated walkthrough

Jev Tutorial for Beginners: State, Questions & the TypeScript SDK

A complete beginner walkthrough of Jev: what a System One decision model is, how state plus Noul, Choice, and Score questions work, what input-only pricing buys you, and the exact TypeScript SDK calls that return calibrated answers in under a second.

Quick takeaway

Jev is a System One decision model from TypeSafe: you send state (plain text, a JSON object, or an array) plus typed questions, and it returns calibrated answers with probabilities — no text generation, no JSON parsing. The three question types are Noul (a yes/no probability where 0.94 means 94% yes and 0.03 means a confident no), Choice (one of your labeled options plus a probability for every option), and Score (a position on a scale you describe in words, which can land between levels, like 1.02). Everything rides in one call: in the demo, three questions about the same support message came back in 834ms for 458 input tokens, and because output tokens are free, about 47,000 message checks cost roughly one dollar at ~500 input tokens each. Get an API key from the TypeSafe console (early access, also reachable through the Vercel AI gateway), install typesafe-ai/sdk, call client.systemOne(), and gate automation on confidence — the video uses a 0.8 threshold to flag frustrated customers for human review.

Video source

Codevolution

22:12ZgXej_9isxY

Step-by-step walkthrough

  1. 1

    Start with the decision your code cannot express

    Free shipping at three or more items is a plain if statement. Flagging a customer who sounds irritated is not: "I've contacted you three times, and I'm still waiting" never uses the word frustrated, yet every human reading it knows. That gap — between rules you can hard-code and judgments that live in language — is exactly where Jev sits. You hand the message to the model, ask whether the customer sounds frustrated, and get a direct answer with a probability attached. TypeSafe calls Jev a System One model after Kahneman's fast, automatic thinking, and the name nods to Jevons' paradox: when decisions get this cheap, you can afford to automate ones you previously left to humans.

    Hand-drawn Jev tutorial slide asking does this customer sound frustrated, showing the message I have contacted you three times and I am still waiting flowing into a Jev box and returning Yes.
    No keyword list can catch this — a language-aware decision can.Watch at 1:35
  2. 2

    Send state plus questions, not a chat prompt

    A Jev request has two halves. The state is the information to judge — plain text, a JSON object, or an array; here it is the customer message. The questions say what you want to know about that state, each with a type: Noul for yes/no, Choice for picking from options you define, Score for a position on a scale you describe. TypeSafe reports 70-500ms response times, and the answers come back as structured data your code consumes directly — not sentences you have to parse. The video's comparison lands the difference: what took GPT about 8.6 seconds, Jev decided in 114 milliseconds, at roughly 1/170th of the cost.

    Jev's input slide showing Information plus Questions, where the state is plain text, a JSON object, or an array holding the message I have contacted you three times and I am still waiting, and the question asks whether the customer sounds frustrated.
    State is what you judge; questions are typed — Noul, Choice, or Score.Watch at 6:52
  3. 3

    Let Choice pick from your menu — and always add an escape hatch

    Choice fits when you already know the buckets. Ask "what is the main request in the message?" and define the options: asking for an update, requesting a refund, requesting a replacement — plus something else, which catches every message outside your taxonomy so the model is never forced into a wrong label. Jev returns the selected option, a probability for every option, and a confidence value so your code can act on clear-cut cases and queue the rest. Score works the same way on a scale you describe in words (0: no frustration, 1: dissatisfaction without strong anger, 2: strong anger), and because the score is a weighted average it can land between levels — 1.5 means genuinely stuck between dissatisfied and angry.

    Choice question slide showing a selected option box and a probability for every option box, explaining that Jev returns the chosen label plus calibrated probabilities for all choices.
    You define the menu; Jev picks one and shows its work for every option.Watch at 8:20
  4. 4

    Know the price of a judgment before you automate all of them

    Jev pricing is input-only: $0.042 per million input tokens (about $42 per billion), and output tokens are free because the model never generates text. The video sizes it with the frustration check: a message plus question runs about 500 input tokens, so one dollar covers roughly 47,000 customer messages. That math is what makes always-on checks — every ticket, every review, every form submission — economically boring instead of a budget meeting. Jev was free to try until September 23rd during early access via the waitlist on the TypeSafe site or through the Vercel AI gateway, with API keys issued from the TypeSafe console.

    Jev cost slide asking what does checking frustration cost, showing about 500 input tokens per message plus question and about 47,000 messages for just one dollar.
    ~500 input tokens per check — about 47,000 messages per dollar.Watch at 5:52
  5. 5

    Make the same call from TypeScript

    The TypeSafe SDK turns the sandbox experiment into three lines of application code. Install typesafe-ai/sdk, put your API key in .env, then import the client and the question helpers: import { choice, noul, score, TypeSafeClient } from "@typesafe-ai/sdk". Build the state once — message: "I've contacted you three times, and I'm still waiting." — and call client.systemOne() with the state and a questions object: isFrustrated: noul("Does `message` express frustration?"), requestType: choice("What is the main request in `message`?", { update: "...", refund: "...", replacement: "...", other: "..." }), frustrationLevel: score("How much frustration does `message` express?", [level descriptions]). Running npm run demo returns model jev-1.13.0 with isFrustrated at 0.94 — and swapping the message to "Thanks for the update, everything works now." drops it to 0.03, a confident no.

    VS Code editor showing all-questions.ts with import of choice, noul, score, and TypeSafeClient from the typesafe-ai SDK, a state holding the contacted-you-three-times message, and a systemOne call with isFrustrated and requestType questions.
    One client, typed helpers — the whole request is ordinary TypeScript.Watch at 16:40
  6. 6

    Read one response with all three answers, then gate on confidence

    Because all three questions share the same state, a single call answers all of them: the terminal shows isFrustrated { type: "noul", noul: 0.94 }, requestType { type: "choice", choice: "update", confidence: 0.99, probabilities: { replacement: 0, update: 0.99, refund: 0, other: 0.01 } }, and frustrationLevel { type: "score", score: 1.02, confidence: 0.97, probabilities: { "1": 0.98, "2": 0.02 } } — 458 input tokens, 84 output tokens, 834ms elapsed. A valid answer can still be wrong, so confidence is a dial, not a guarantee: the demo flags the customer for support review only when the value clears a 0.8 threshold, and leaves the message in the normal queue otherwise. Tune that threshold against your own examples — that calibration work is what makes the automation trustworthy.

    Terminal output from the Jev TypeScript demo showing model jev-1.13.0 with isFrustrated noul 0.94, requestType choice update at confidence 0.99, frustrationLevel score 1.02 at confidence 0.97, 458 input tokens, and 834ms elapsed.
    Three answers, one call, 834ms — gate the automation on confidence.Watch at 17:46

Frequently asked questions

What is Jev in one sentence?

Jev is a System One decision model from TypeSafe: you send state plus typed questions, and it returns structured answers with calibrated probabilities — no text generation, no JSON parsing, and answers typically in 70-500ms. The name comes from Jevons' paradox: when decisions become cheap enough, applications use far more of them.

How is Jev different from asking GPT or Claude the same question?

General-purpose models can decide things, but they generate the answer token by token and can also write, explain, and code. Jev only decides, computing answer probabilities in parallel in a single forward pass — in the video's example it answered in 114ms where GPT took about 8.6 seconds, at roughly 1/170th of the cost, with the output guaranteed to fit your schema.

What is the difference between Noul, Choice, and Score?

Noul answers a yes/no question with the probability of "yes" — 0.94 means 94% yes, and a low value like 0.03 means a confident no, not uncertainty. Choice makes the model pick one of your labeled options and returns probabilities for every option plus a confidence value. Score places the input on a scale you describe level by level, and because it is a weighted average the result can fall between levels — 1.02 means just past level 1.

How much does Jev cost to run?

Input tokens cost $0.042 per million and output tokens are free, so a typical ~500-token message check works out to about 47,000 checks per dollar. There is no per-output-token billing because the model never generates text. During early access Jev was free until September 23rd, with access through the TypeSafe waitlist or the Vercel AI gateway.