Jev on Vercel
Jev is one HTTPS POST, so using it from a Vercel app is just a fetch — no SDK required. Call the hosted endpoint with your jv_live_ key from any Serverless or Edge function and every decision bills through your own account. If you've standardized on the AI SDK or the Vercel AI Gateway, Jev is reachable there too.
Jedes Beispiel braucht einen jv_live_-Key. Hol dir einen auf der Pricing-Seite, exportiere ihn als JEV_API_KEY, und du bist startklar. Key holen →
Jev is TypeSafe AI's System One decision model — send state plus typed questions, get back one option per question (choice), a rating (score), or a calibrated yes/no (noul), each with confidence. That's a plain JSON POST, which is the most portable thing you can run on Vercel.
Call the hosted endpoint directly (recommended)
Works unchanged in a Serverless function, an Edge function, a Route Handler, or a Server Action. Put your key in the project's environment variables (Settings → Environment Variables → JEV_API_KEY) and fetch:
// app/api/triage/route.ts — a Vercel Route Handler
export async function POST(req: Request) {
const { text } = await req.json();
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.JEV_API_KEY}`, // jv_live_...
},
body: JSON.stringify({
state: { text },
questions: {
queue: { type: "choice", instructions: "Which queue should this go to?",
criteria: { billing: "payments", technical: "bugs", abuse: "spam/fraud", sales: "pricing" } },
},
}),
});
const { answers } = await res.json();
return Response.json({ queue: answers.queue.choice, confidence: answers.queue.confidence });
}This is the path that bills through your hosted jevtypesafeai.com account. It has no cold-start cost beyond the HTTP hop and runs on the Edge runtime too.
Using the AI SDK
If your app is built on the AI SDK, recent versions expose Jev through an experimental evaluate API with the model id typesafe-ai/jev, so decision calls sit alongside your generation calls. Note that routing a model id through the AI SDK's default Gateway provider sends the call through the Vercel AI Gateway (below) rather than your hosted Jev account — reach for the direct fetch above when you want usage billed to jevtypesafeai.com.
Via the Vercel AI Gateway
If you route every model through the Vercel AI Gateway, Jev is available there too — select the typesafe-ai/jev model and the Gateway reads your AI_GATEWAY_API_KEY. This is convenient if the Gateway is already your single control point for keys, budgets and logs, but the decision then runs and bills through Vercel's gateway, not your hosted Jev account. Pick this for unified Gateway ops; pick the direct endpoint for hosted-account billing.
What to use it for
- Classify or route form and webhook payloads inside a Route Handler before you store them.
- Gate a Server Action with a calibrated noul (is this safe / in policy?) before it runs.
- Score or moderate user content at the edge with sub-cent, ~70–500ms decisions.
- Pick the downstream model for a generation request, then call it — a cheap typed router.
FAQ
What's the simplest way to use Jev on Vercel?
A fetch to https://jevtypesafeai.com/api/v1/decide with your jv_live_ key, from any Route Handler, Serverless or Edge function. Read answers.<question>.choice / .noul / .score from the response. No SDK needed, and it bills through your hosted account.
Where do I put my Jev key on Vercel?
In the project's Environment Variables (Settings → Environment Variables), e.g. JEV_API_KEY=jv_live_..., then read process.env.JEV_API_KEY in your function. Add it for Production, Preview and Development as needed.
Does Jev work on the Edge runtime?
Yes. It's a standard fetch to an HTTPS endpoint, so it runs in Edge functions and middleware as well as Node Serverless functions — no SDK or Node-only API required.
Should I use the Vercel AI Gateway or call Jev directly?
Both work. Calling the hosted endpoint directly bills through your jevtypesafeai.com account and is the simplest. The Vercel AI Gateway is handy if it's already your single control point for keys, budgets and logs — but it routes and bills through Vercel rather than your hosted Jev account.
Can I use Jev with the AI SDK?
Yes — recent AI SDK versions expose Jev through an experimental evaluate API with the model id typesafe-ai/jev. Be aware that a Gateway model id routes through the Vercel AI Gateway; use a direct fetch to the hosted endpoint if you want the call billed to your Jev account.
Siehe auch: How to use the Jev API · Jev from TypeScript · TypeScript quickstart · Pricing
Probiere Jev, bevor du es einbindest
Führe eine echte, typisierte Entscheidung im Browser aus — kostenlos, ohne Anmeldung — und setze dann deinen Key in das Beispiel oben ein.