state
The information Jev judges. It can be text or structured data, such as a ticket record. It is not a chat prompt asking Jev to write a reply.
{
"ticket": {
"message": "I was charged twice this month. Please help."
}
}Start building
OfficialGo from API key to a typed Jev decision your application can branch on in about five minutes.
Follow one support ticket through a Choice question, read the selected category, then route it in your own code. These are server-side examples; this page never asks for your key or calls the API.
API key to application branch
Use the same ticket in every language: “I was charged twice this month. Please help.” Ask “What is this ticket about?” with billing, technical, and other as the possible answers. Select a language once; the entire coding flow changes with it.
TypeScript path · Node.js 20 or newer
Install the JavaScript SDK
The official package includes TypeScript declarations. Run the example in your server-side Node.js application.
npm install @typesafe-ai/sdkSet your API key
Create a key in the TypeSafe dashboard when your account has API access. Keep it in your server environment, never in browser code.
export TYPESAFE_API_KEY="YOUR_KEY"Ask one Choice question
The SDK reads TYPESAFE_API_KEY and uses jev-latest by default. The question ID is category; its answer returns under the same ID.
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";
const ticket = "I was charged twice this month. Please help.";
const client = new TypeSafeClient();
const response = await client.systemOne({
state: ticket,
questions: {
category: choice("What is this ticket about?", {
billing: null,
technical: null,
other: null,
}),
},
});Read the typed result
A Choice answer contains choice, probabilities, and confidence. Here billing is an illustrative outcome; your actual result may differ.
const category = response.answers.category.choice;
// Example: "billing"Route the ticket in application code
Replace these handler names with your application's own functions. Keep routing policy in code.
switch (category) {
case "billing":
await handleBilling(ticket);
break;
case "technical":
await handleTechnical(ticket);
break;
default:
await handleGeneral(ticket);
}“billing” is an example outcome for this ticket, not a guaranteed result or a live run. Check the returned value and confidence before automating consequential actions.
The information Jev judges. It can be text or structured data, such as a ticket record. It is not a chat prompt asking Jev to write a reply.
{
"ticket": {
"message": "I was charged twice this month. Please help."
}
}The narrow typed judgments to make about that state. One request can include several independent questions. Keep ordinary deterministic business rules in application code.
state → Choice question → typed answer → your branch
The first call uses Choice. For the same ticket, you could also ask a Score question for urgency and a Noul yes/no question for human review. Each answer is independent, and your code decides how to combine them.
Choice
Which known category fits this ticket?
Score
Where does this ticket fall on your urgency scale?
Noul
Does this ticket need a human review?
One state → Choice + Score + Noul → code
Plan questions with JevKit’s generic builder. Its output is not an official Jev API payload.
TypeSafe SDKs retry 429 and 529 by default. For direct HTTP calls, retry with backoff.
Evidence
JevKit is an independent site. SDK calls, the HTTP endpoint, and answer fields are verified against TypeSafe documentation. The ticket and routing policy are illustrative.
Last verified:
Last verified:
Last verified:
Last verified:
Last verified:
Last verified:
Last verified:
Next step
Choose the questions and allowed answers your workflow needs, then connect them to your own application logic. The builder makes a generic planning schema, not an API payload.