Jev API

Jev API examples

The Jev integration pattern is simple: provide state, ask typed questions, and branch in your application. This page is the short version; the how-to guide has curl and SDK install.

01

Choice: pick one Jev label

The best first Jev integration is a question your application already answers imperfectly with rules or a general-purpose model. Name the output and define the values your code can handle. Pin jev-1.13.0 once the threshold is tuned.

const result = await jev.decide({
  state: message,
  questions: [{
    type: "choice",
    name: "topic",
    values: ["billing", "bug", "account", "feature"]
  }]
});
02

Score: place Jev on an ordered scale

Ask Jev where the state sits on a 2–10 level rubric you describe in words. The returned score can be fractional. Use it for urgency, risk, lead quality, or review priority — then threshold in code.

03

Noul: a Jev yes/no probability

A noul is a calibrated probability that a proposition is true. It is the right primitive for escalate / allow / needs-review gates. There is no separate confidence field; the probability is the certainty measure.

04

Batch related Jev decisions

Ask for topic, severity, and escalation in the same request when they share the same input state. They run together and share the state token cost. Keep each question independently useful so you can measure it.

questions: [topicQuestion, severityQuestion, escalationQuestion]
05

Put a fallback behind every Jev action

A typed value makes branching easier, not risk-free. Log the input, output, probability, model version, and downstream result. Set a confidence threshold and route uncertain cases to GPT, Claude, or a human.

FAQ

What is the Jev API endpoint?

POST https://api.typesafe.ai/v1/systemone with a Bearer TypeSafe API key. Official SDKs wrap the same call.

What question types does the Jev API support?

Choice (one of N labels), score (ordered 2–10 level rubric), and noul (yes/no probability). You can send several questions in one request.