Jev, by TypeSafe, is a judgment model, not a chat model. Give it a piece of text and a question and it answers directly: which category, what score, yes or no — in a form your program can use as-is. Typical uses: route a "charged twice" complaint to the billing team, score a review for satisfaction, or decide whether an email is asking for a refund.
Jev uses the TypeSafe request format: submit state and questions, read answers. It does not accept messages, stream, temperature or max_tokens, and cannot be used as a conversation model in Codex, Claude Code or similar clients. Authentication is the same as other endpoints — Authorization: Bearer sk-xxxxxxxx — and the key must be in the TypeSafe Enterprise group (models jev-latest / jev-1.14.0 / jev-1.13.0, 17% off list price) or the TypeSafe Bonus group (model Jev, discounted, availability not guaranteed). /v1/decisions and /v1/systemone are equivalent.
Classify a "charged twice" message into billing, technical or other. Enterprise model names are jev-latest (always the newest, currently 1.14.0), jev-1.14.0 (pinned) or jev-1.13.0 (pinned); the Bonus group uses Jev.
curl "https://cn.chatapi.app/v1/decisions" \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "I was charged twice for the same order.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this customer message?",
"criteria": {
"billing": "Charges, payments and refunds",
"technical": "Bugs and integration issues",
"other": "Other requests"
}
}
}
}'
The message is routed to billing, with a probability for every option. answers.department.choice is the selected category, probabilities lists each option's probability, and confidence is the model's confidence in this judgment.
{
"model": "jev-latest",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {"billing": 0.96, "technical": 0.01, "other": 0.03},
"confidence": 0.92
}
},
"usage": {"input_tokens": 339, "output_tokens": 38}
}
| Type | What you send | What you read |
|---|---|---|
choice classification | criteria: an object of "option → description", up to 255 options | choice, probabilities, confidence |
score rating | criteria: an array of descriptions ordered from lowest to highest (2–10 levels) | score (may be fractional), legend, probabilities, confidence |
noul yes/no | Only instructions; optional criteria.true / criteria.false | noul: a value in 0–1, closer to 1 means "yes" |
state can be text, an object or an array. Every question name you define under questions comes back under answers; multiple questions are judged independently — one answer is never fed into the next.
{
"model": "jev-latest",
"state": "It broke after three days and support was rude.",
"questions": {
"sentiment": {
"type": "score",
"instructions": "Rate the satisfaction of this review",
"criteria": ["very unhappy", "unhappy", "neutral", "happy", "very happy"]
}
}
}
// answers.sentiment → {"type":"score","score":0.01,"legend":{"0":"very unhappy",...},"probabilities":{"0":0.99,...},"confidence":0.99}
{
"model": "jev-latest",
"state": "Hi, I want to cancel my subscription and get a refund.",
"questions": {
"is_refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}
}
}
// answers.is_refund → {"type":"noul","noul":0.99}
The TypeSafe SDKs work unchanged: point base_url at the gateway, use your XycAi key, and set the model to jev-latest.
Python (pip install typesafe-sdk):
import os
from typesafe_sdk import Choice, TypeSafeClient
client = TypeSafeClient(
api_key=os.environ["XYCAI_API_KEY"],
base_url="https://cn.chatapi.app",
model="jev-latest",
)
response = client.system_one(
state="I was charged twice for the same order.",
questions={
"department": Choice(
instructions="Which team should handle this customer message?",
criteria={
"billing": "Charges, payments and refunds",
"technical": "Bugs and integration issues",
"other": "Other requests",
},
),
},
)
print(response.answers["department"])
TypeScript (npm install @typesafe-ai/sdk):
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";
const client = new TypeSafeClient({
apiKey: process.env.XYCAI_API_KEY,
baseURL: "https://cn.chatapi.app",
});
const response = await client.systemOne({
model: "jev-latest",
state: "I was charged twice for the same order.",
questions: {
department: choice("Which team should handle this customer message?", {
billing: "Charges, payments and refunds",
technical: "Bugs and integration issues",
other: "Other requests",
}),
},
});
console.log(response.answers.department);
Billed on input tokens only; output is free. See the TypeSafe Enterprise / Bonus price on the Model Square. state plus the longest single question must not exceed 32K tokens; state plus all questions combined must not exceed 64K tokens.
| Status | Cause |
|---|---|
401 | Invalid key or missing Authorization: Bearer header |
403 | The key's group does not include the requested model: use jev-latest / jev-1.14.0 / jev-1.13.0 with the Enterprise group, or Jev with the Bonus group |
400 | Malformed state, questions, question type or criteria; the error message names the field |
404 | The path must be /v1/decisions or /v1/systemone |
429 | Rate limited — back off exponentially and retry; the official SDKs retry automatically |
Full interface reference: TypeSafe API docs; complete syntax for the three types: TypeSafe primitives.