Jev API
Jev API: Quickstart and Examples
Understand the request shape, try a real classification, then copy a server-side integration example.
Never expose an AI Gateway key in browser-side code.
Quick answer
How does the Jev API work?
Send shared state plus a typed question and finite Choice options through the verified Vercel AI Gateway Evaluation endpoint. Read the selected answer and probabilities only when the provider returns them.
Try the request
State + question + choices.
AI processing: Don't submit sensitive or confidential data. Privacy
20 free classifications/day · No account requiredRequest examples
Keep the key on the server.
import { createGateway, experimental_evaluate as evaluate } from "ai";
const gateway = createGateway({ apiKey: process.env.AI_GATEWAY_API_KEY });
const result = await evaluate({
model: gateway.evaluationModel("typesafe-ai/jev"),
state: text,
questions: {
category: {
type: "choice",
instructions: "Classify the text into the best category.",
criteria: { option_0: "Billing", option_1: "Technical", option_2: "Other" },
},
},
maxRetries: 0,
});Request anatomy
state
The text or structured context to evaluate.
questions
A map of typed decisions sharing the same state.
Choice
A finite option map; the result identifies the selected option.
Developer tool
Already know your categories?
Generate a TypeScript or Python starter from the same classification setup.