Skip to main content

Jev Tutorial

This tutorial takes you from zero to a first typed decision from Jev in three steps. Jev is available as typesafe/jev-1.13 on OpenRouter, and all you need is an OpenRouter API key. If you want a few concepts before diving into code, start with the Jev documentation hub. If you already know Jev and want the full request schema, go to the Decisions API reference.

What Jev returns

Jev is a System One decision model from TypeSafe. Instead of generating text, Jev answers typed questions about the state you send it:
  • Choice picks one option from a set you define and returns a probability for each option.
  • Noul answers a yes or no question and returns the probability of yes.
  • Score places the input on an ordered scale you define and returns a probability-weighted position.
Because the answer is a typed value with an associated probability, your implementation can branch on it directly. There is no free-form text to parse.

Step 1: Get an OpenRouter API key

Create a key at openrouter.ai/settings/keys, then export it:
Jev calls are billed to your OpenRouter account at the input price shown on the Jev model page. Keep the key server-side and never ship it in browser code.

Step 2: Make your first decision call

The example below routes a support ticket. It asks Jev three independent questions in one request, whether the ticket is a bug (Noul), which team owns it (Choice), and how urgent it is (Score).

Step 3: Read the answers

The response contains one typed answer per question, plus usage. This is an actual response to the request above, captured from the live API. Your probabilities will differ slightly from run to run, and the field shapes are documented in the Decisions API reference:
The model field in the response names the dated snapshot that served your request. Sending typesafe/jev-1.13 resolves to the current 1.13 release, so a dated suffix here is expected. How to read each field:
  • is_bug.noul is the probability that the answer is yes, a number between 0 and 1. A value of 0.96 means Jev is pretty sure this is a defect. Values near 0.5 mean the answer is about equally likely to be yes or no. It doesn’t mean the bug is “medium.”
  • team.choice is the selected option. team.probabilities compares the different options you listed as alternatives. team.confidence summarizes how concentrated that distribution is.
  • urgency.score is the probability-weighted position on your ordered scale, with index 0 corresponding to the first criterion you listed. A score of 1.99 sits almost exactly on “Blocking revenue right now.”
You’ll need to branch on these values in your code. For example, you might auto-route tickets where team.confidence is above a threshold tuned on labeled tickets, and send the rest to a human queue. Confidence describes the distribution of the alternatives, not whether the workflow is safe to run, so pick thresholds from the cost of each kind of mistake rather than from a round number.

Use the TypeSafe SDK instead

If you’re already using the TypeSafe JavaScript or Python SDK, you’ll just need to point it at OpenRouter and keep your existing code. The Jev SDK guide covers setting the base URL, authentication, and the expected response shape.
You can also call the Decisions API through the OpenRouter TypeScript, Python, or Go SDK.

Frequently asked questions

How do I get access to Jev? Simply create an OpenRouter API key and send a request to the Decisions API with model set to typesafe/jev-1.13. You don’t need a separate signup, a waitlist, or a TypeSafe account. What does Jev cost? Jev is billed based on the number of input tokens, and output tokens are free. On the Jev model page, you can find the current price and the context length. Finally, each response has a usage.cost field that reports what that call cost you in USD. Is Jev an LLM? No, Jev is a System One decision model which returns answers that are typed with probabilities rather than generated text, and does not return any reasoning trace or explanation for the answer. Can I ask more than one question per request? Yes, put every independent question about the same state in one request. All questions in the request are answered in parallel and cannot see each other’s answers. Can I use ~typesafe/jev-latest? Yes. The current Jev release is tracked under the ~typesafe/jev-latest alias. Pin typesafe/jev-1.13 when you need thresholds tuned against one specific version to stay stable.

Next steps