Most developers trying the Jev AI API for the first time hit the exact same wall: they point an OpenAI-compatible SDK at /v1/chat/completions, pass a prompt asking for JSON, and get an error or unusable response. That happens because Jev is a System-1 decision model from TypeSafe AI—it does not generate chat prose. Instead, the Jev AI API evaluates a state against typed questions in parallel and returns calibrated probabilities.
This Jev AI API quickstart gives you the exact endpoints, the three supported question schemas (noul, choice, and score), working curl and TypeScript requests, and real production latency and cost numbers. Every figure below is verified against TypeSafe AI's documentation, OpenRouter's typesafe/jev-1.13 and typesafe/jev-1.14 listings, and our own six production-shaped calls on jev-ai.org (median ~310 ms round trip at $0.000023–$0.000038 per call). (Note: in medicine, JEV stands for Japanese encephalitis virus; this guide covers the Jev AI API by TypeSafe AI.)
Jev AI API at a Glance
| Property | Value | Notes |
|---|---|---|
| Pinned model IDs | typesafe/jev-1.13, typesafe/jev-1.14 | Use pinned IDs once you tune thresholds |
| Rolling alias | ~typesafe/jev-latest | Automatically tracks the latest build |
| OpenRouter Decisions API | POST https://openrouter.ai/api/alpha/decisions | Best for plain HTTP or OpenRouter SDKs |
| System One API | POST https://openrouter.ai/api/v1/systemone | Compatible with TypeSafe's official SDK |
| Question types | noul, choice, score | Evaluated in parallel against one state |
| Context & list rate | 32K input tokens · $0.042 / 1M input · $0 output | Measured calls: $0.000023–$0.000038 each |
| Measured round trip | ~310 ms median (our 6 live calls) | TypeSafe workflow eval: 0.4 s at $0.0004/case |
Why the Jev AI API Beats Prompting a Chat LLM for Decisions
Using a frontier LLM for routing, moderation, or triage means paying for generated tokens, parsing brittle JSON, and waiting seconds per call. In TypeSafe's four-workflow evaluation, Jev averaged $0.0004 and 0.4 s per case (67.8% agreement) compared with $0.084 and 23 s per case (74.1% agreement) for the top frontier LLM. On a live safety classifier reported by TechCrunch, a Vercel engineer observed 5–18× faster execution after moving off an LLM.
The Jev AI API delivers that speed by eliminating free-form token generation completely:
noul: Returns a calibrated yes/no probability between0and1.choice: Picks one label from your declared options and returns a probability per label.score: Places the input on an ordered numeric or tiered scale with per-tier probabilities.
Before writing code, you can test any schema interactively on the Jev AI Model Playground and copy the exact payload into your Jev AI API client.
Step 1: Send Your First Jev AI API Request with curl
Set your key on the server (never expose keys in browser code) and call the Decisions endpoint with a state plus multiple typed questions in one pass:
export OPENROUTER_API_KEY="sk-or-..."
curl https://openrouter.ai/api/alpha/decisions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.14",
"state": "User reports checkout failed twice with card error 402 and asks for an immediate refund.",
"questions": {
"is_billing_urgent": { "type": "noul", "question": "Does this require urgent billing intervention?" },
"route_queue": {
"type": "choice",
"question": "Which support queue owns this ticket?",
"choices": ["billing", "engineering", "sales", "general"]
},
"churn_risk": {
"type": "score",
"question": "How high is the customer churn risk?",
"tiers": ["low", "medium", "high"]
}
}
}'
Because the Jev AI API scores all three questions in parallel over the same state, adding a third or fourth policy check barely moves total latency.
Step 2: TypeScript Client Pattern for the Jev AI API
In production TypeScript services, wrap the Jev AI API behind a typed helper that branches on calibrated probability thresholds rather than blind argmax labels:
async function evaluateTicket(ticketText: string) {
const res = await fetch("https://openrouter.ai/api/alpha/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OPENROUTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "typesafe/jev-1.14",
state: ticketText,
questions: {
escalate: { type: "noul", question: "Should this ticket escalate to a senior agent?" },
},
}),
});
if (!res.ok) throw new Error(`Jev AI API error: ${res.status}`);
return res.json();
}
Set explicit thresholds in your Jev AI API handler—for example, auto-escalate above 0.85, log for review between 0.45 and 0.85, and auto-route below 0.45. For gateway-specific Jev AI API setups, see our OpenRouter Jev guide and Vercel AI Gateway setup.
Three Mistakes That Break First Jev AI API Integrations
- Calling
/chat/completionsdirectly: Chat endpoints do not expose typed Jev decision schemas (typesafe/jev-routeris a chat router built on Jev, not the raw decision model). Always call/api/alpha/decisionsor/api/v1/systemonefor the Jev AI API. - Asking open-ended questions: Prompts like "Summarize why the user is upset" cannot be answered by the Jev AI API. Convert every decision into a
noul,choice, orscoreschema. - Using a rolling alias without re-testing thresholds: If your production Jev AI API pipeline relies on tight probability cutoffs, pin
typesafe/jev-1.13ortypesafe/jev-1.14instead of~typesafe/jev-latest.
Ready to test your own JSON schemas before deploying the Jev AI API? Try live scenarios on the Jev AI Model Playground, read How to Use Jev AI, or inspect full numbers in TypeSafe AI Jev Benchmarks.
Frequently Asked Questions
Does the Jev AI API work with the OpenAI chat SDK?
Not on /chat/completions. The Jev AI API uses dedicated decision endpoints (POST /api/alpha/decisions or POST /api/v1/systemone) because it returns typed probabilities rather than streamed chat tokens.
How much does a Jev AI API call cost?
OpenRouter lists the Jev AI API at $0.042 per million input tokens and $0 output tokens. In our six production-shaped tests on jev-ai.org, each Jev AI API call cost $0.000023–$0.000038 with a ~310 ms median round trip.
What are the current Jev AI API rate limits?
TypeSafe's official models documentation lists Jev AI API limits at 100K tokens per second and 40 requests per second, noting that limits continue to adjust during early access.
Where can I test Jev AI API payloads without writing code?
Open the Jev AI Model Playground in your browser to test nine built-in templates or your own custom noul, choice, and score questions immediately.
Sources
- TypeSafe AI Documentation — Introduction — Official
noul,choice, andscoredecision primitives. - OpenRouter — typesafe/jev-1.13 Model Page — Verified endpoints, $0.042/1M input pricing, and 32K context window.
- TypeSafe AI Workflow Evals — Published four-workflow evaluation ($0.0004 / 0.4 s / 67.8% vs. LLM $0.084 / 23 s / 74.1%).
- jev-ai.org Model Playground — Live browser testing environment and measured production calls (checked November 28, 2026).




