An LLM writes. Jev decides.
Most AI work in a revenue or content system is not generation. It is a small decision made thousands of times: is this reply a meeting request, does this page answer that question, does this draft fit this buyer. Teams pay frontier-model prices for those yes-or-no calls and then parse free text to get a boolean back.
Jev is built for exactly that step. You pass a state (text or JSON) and a map of questions. TypeSafe's own API supports three primitives: a choice from a list, a score on a rubric, and a true-or-false statement. The AI SDK exposes them through experimental_evaluate. This guide uses the boolean form because it is the easiest to check.
If you already use an LLM as a judge or force structured outputs to get a label back, this is the same job with a model built for it.
Get an AI Gateway key with a hard ceiling
- Open the Jev model page on Vercel and sign in.
- In AI Gateway, create an API key. Give it a small spend limit and an expiry date. A test key should never be able to run up a real bill.
- Expect Vercel to ask for billing details before it serves requests. Read the current terms on the sign-up screen; they change.
The key belongs in a local .env file or your server's secret store. Never in client-side code, never in Git.
Make a one-file project
You need Node.js 20.6 or newer, which reads .env files natively. Run this in a terminal, then replace the placeholder with your key.
mkdir jev-first-call && cd jev-first-call
npm init -y
npm install ai
printf '.env\nnode_modules/\n' >> .gitignore
echo 'AI_GATEWAY_API_KEY=paste_your_key_here' > .envAsk three questions about one email
Most quickstarts ask one question. Ask three, because that is how you will use it in production: one state, several decisions, one round trip. Save this as first-call.mjs:
// first-call.mjs
import { experimental_evaluate as evaluate } from 'ai';
// The state is what Jev reads. Here: one inbound email.
const state = `From: Priya (Head of RevOps)
Subject: Re: pipeline audit
Thanks for the teardown. Can we get 30 minutes next week to walk
through pricing for the full audit? Tuesday afternoon works.`;
const started = Date.now();
const { answers, usage } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
wantsMeeting: {
type: 'boolean',
instructions: 'The sender is asking to book a call or meeting.',
},
askingPrice: {
type: 'boolean',
instructions: 'The sender wants to know what the work would cost.',
},
unsubscribe: {
type: 'boolean',
instructions: 'The sender wants to stop receiving emails.',
},
},
maxRetries: 0,
});
console.log(JSON.stringify(answers, null, 2));
console.log('ms:', Date.now() - started, '| input tokens:', usage?.inputTokens);node --env-file=.env first-call.mjsEach answer comes back with a probability between 0 and 1. For this email you should see wantsMeeting and askingPrice high and unsubscribe low. If you don't, read the question wording before blaming the model.
Turn probabilities into decisions
Change the email to a polite "not now, maybe next quarter" and run it again. Then decide what your code does with each number:
| Probability | What I would do |
|---|---|
| Clearly high | Act automatically: route, tag, or queue the next step. |
| Middle band | Send to a human queue. This is where the model is telling you it is unsure. |
| Clearly low | Skip, and log it so you can audit the misses later. |
Where the bands sit is your call, not the vendor's. Label 30 to 50 real examples where you know the right answer, run them, and set the cut-offs from what you see. That is a golden eval set, and it is the difference between a demo and a system you can trust at volume.
Work out the cost from usage
The script prints usage.inputTokens. Multiply by the input price per token. At $0.042 per million, a 2,000-token state costs about $0.000084, so 10,000 of those decisions cost roughly 84 cents. Output is not billed at launch pricing.
Or paste this into Claude Code or Codex
The prompt carries the guardrails: a capped key, no printed secrets, real outputs only, and no billing changes without you.
Set up a minimal Jev demo on my computer through Vercel AI Gateway.
1. Read https://vercel.com/ai-gateway/models/jev and the AI SDK reference for experimental_evaluate before writing code. Use experimental_evaluate with model 'typesafe-ai/jev'. Do not use generateText.
2. Create a new folder called jev-first-call. Check Node.js is 20.6 or newer (needed for --env-file). Install only the ai package. Do not touch my other projects.
3. If AI_GATEWAY_API_KEY is already set, reuse it. Otherwise walk me through creating an AI Gateway key with a small spend limit and an expiry date. Store it in .env, add .env to .gitignore, and never print the key.
4. Write first-call.mjs: one inbound sales email as the state and three boolean questions in ONE call (wantsMeeting, askingPrice, unsubscribe). Log the answers, elapsed milliseconds, and usage.inputTokens.
5. Run it. Then change the email to a polite "not now, maybe next quarter" and run it again. Show me both real outputs side by side. Never invent or estimate an output.
6. Work out the cost from usage.inputTokens at the current per-million input price on the model page.
7. If a request fails, stop and tell me the exact error. If Vercel needs sign-in, billing, or verification, ask me to do it. Do not buy credits or change billing settings.
8. Leave a short README with the command to run it again. Nothing gets deployed.What to watch before you build on it
- The API is experimental.
experimental_evaluatecan change between AI SDK releases. Pin the version and wrap the call in one function. - 32K tokens is the ceiling. Long pages and call transcripts need trimming or chunking before they become state.
- Speed figures are the vendor's. TypeSafe quotes 70–500 ms end to end. Measure from your own region before you promise anyone a latency.
- Calibrated is not correct. A 0.9 is still wrong one time in ten if the calibration holds. Keep a human queue for the middle band.
Give it a real job
Once the first call works, the useful jobs are the repetitive ones: deciding which pages should link to your money pages, or finding prospects who are asking for what you sell. Both guides reuse this exact call shape.
Jev setup questions
What is Jev?
Jev is TypeSafe AI's first System One model. It does not write text. It reads a state you provide and answers typed questions about it, such as true or false, a choice from a list, or a score, each with a probability your code can act on.
How much does a Jev call cost?
At launch, Vercel AI Gateway and TypeSafe list Jev at $0.042 per million input tokens, and output is not billed. A 2,000-token state costs about $0.000084. Check the model page for current pricing before you budget.
Do I need a TypeSafe account to use Jev?
Not for this route. Vercel AI Gateway serves Jev with a single AI_GATEWAY_API_KEY. TypeSafe also offers its own API and SDKs if you want to call it directly.
How long can the state be?
Vercel lists a 32,000-token context window for Jev. Trim long pages or transcripts before sending them, and keep a margin for your questions.
Is experimental_evaluate stable?
No. The experimental_ prefix in the AI SDK means the API can change between releases. Pin your ai package version and keep the call behind one small function so an upgrade touches one file.
Where the numbers come from
- Jev on Vercel AI Gateway: pricing, context window, model ID.
- AI SDK reference: experimental_evaluate: parameters and return shape.
- TypeSafe: Introducing System One models and Jev: latency claims and launch pricing.
- TypeSafe docs: question types and parallel evaluation.
- Further reading: Ben Broch's Jev quickstart, with his own measured first call.