Learn Jev
Jev API
- Endpoint
- POST https://api.typesafe.ai/v1/systemone
- Auth
- Bearer TypeSafe API key
- Content type
- application/json
- Default model
- jev-latest
- SDKs
- Python, JavaScript/TypeScript
- Response
- Answers keyed by question id
The minimal request
The body is a model name, the state Jev should read, and a map of questions keyed by the id you want back.
curl https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "I was charged twice for my subscription this month. Please refund the extra charge.",
"questions": {
"billing": {
"type": "noul",
"instructions": "Is this message about billing?"
},
"tone": {
"type": "choice",
"instructions": "What is the tone of this message?",
"criteria": {
"angry": "An upset or hostile message",
"calm": "A neutral or polite message",
"excited": "An enthusiastic or eager message"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this message?",
"criteria": [
"Can wait",
"Needs attention this week",
"Needs attention today"
]
}
}
}'{
"model": "jev-1.14.0",
"answers": {
"billing": { "type": "noul", "noul": 0.98 },
"tone": {
"type": "choice",
"choice": "calm",
"confidence": 0.7,
"probabilities": { "angry": 0.15, "calm": 0.8, "excited": 0.05 }
},
"urgency": {
"type": "score",
"score": 1.2,
"confidence": 0.62,
"probabilities": { "0": 0.12, "1": 0.56, "2": 0.32 }
}
},
"usage": { "input_tokens": 142, "output_tokens": 12 }
}state accepts a string, a JSON object, or an array of text values. The questions object can mix Choice, Score, Noul, and Box. Each question is evaluated against the same state in parallel, so a request with several questions is not a chain of model calls.
Request fields
The field names below are the ones the API accepts. The official API reference has the complete schema.
| Field | What it does |
|---|---|
model | The model ID or alias. Use jev-latest unless you need to pin a version. |
state | The text, JSON, or images Jev evaluates. Everything the question needs should be here. |
questions | An object keyed by question id. Each value has a type and instructions; Choice and Score also take criteria. |
questions.*.type | choice, score, noul, or box. Box needs Jev 1.14 and the images danger-zone header. |
questions.*.criteria | Choice takes a map of option to description. Score takes an ordered array of levels. Noul does not need criteria. |
Models and aliases
Every model runs on the same endpoint. The model field selects which one handles the request.
| Name | What it is |
|---|---|
jev-latest | The stable alias. Currently points to jev-1.14.0 and is the default in the SDKs. |
jev-preview | The most recent release, including previews. Currently points to the same model as jev-latest. |
jev-1.14.0 | Versioned ID for Jev 1.14. Adds Box questions and image input under the danger-zone headers. |
jev-1.13.0 | Previous stable version. Choice, Score, and Noul; still available for pinned workloads. |
model field records the version that answered.SDKs
The official clients add typed questions, typed answers, default retries, and error classes. They read TYPESAFE_API_KEY from the environment.
pip install typesafe-sdk
npm install @typesafe-ai/sdkfrom typesafe_sdk import Choice, TypeSafeClient
with TypeSafeClient(model="jev-latest") as client: # reads TYPESAFE_API_KEY
response = client.system_one(
state="I was charged twice for my subscription this month.",
questions={
"intent": Choice(
instructions="What does the customer want?",
criteria={
"refund": "A refund or charge correction",
"support": "Help using the product",
"cancel": "Cancel the subscription",
},
),
},
)
print(response.choices["intent"].choice)The Python client needs Python 3.10 or later. The JavaScript and TypeScript client needs Node.js 20 or later. Both expose the same primitives and return answers grouped by question type.
The directory tracks the other clients and integrations, including Go, .NET, PHP, Rust, Elixir, Ruby, Scala, DSPy, LlamaIndex, and Home Assistant.
Limits, retries, and errors
The parts that decide whether an integration survives production traffic.
- Default context: 64k tokens per request and 32k per question.
- Long context: 262k tokens with the TypeSafe-Danger-Zone-Long-Context header.
- Rate limits: tokens per second and requests per second, set per organization.
- 429 responses include a retry-after header when the API can estimate the wait.
- The official SDKs retry rate limits with backoff by default.
- Pin a model version when a threshold must stay attached to known behavior.
Keep reading
The API is one piece. These pages cover the model, the bill, and the alternatives.
- What is Jev?The model, the primitives, and what it does and does not do.
- Jev pricingInput-token pricing, free output tokens, and cost per decision.
- Jev alternativesOpen-weight and hosted options if the hosted API is not the right fit.
- SDKs and clientsOfficial and community clients for the System One API.
Common questions
Short answers, with the source documentation linked where the detail matters.