System One
TypeSafe Jev (System One) decision API.
POST /v1/systemone takes a state to evaluate and a map of typed questions, and returns structured answers with probabilities and confidence per question. It serves the TypeSafe Jev (System One) model with the native TypeSafe schema — request and response shapes are identical. This is not a chat model and cannot be called via /v1/chat/completions.
Connecting#
Reuse any TypeSafe documentation example as-is — replace https://api.typesafe.ai with https://apirouter.pleum.ai and your TypeSafe key with a plm_ key. The body format is unchanged.
import os
import requests
resp = requests.post(
"https://apirouter.pleum.ai/v1/systemone",
headers={
"Authorization": f"Bearer {os.environ['PLEUM_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "jev-latest",
"state": "Hi, I've been trying to connect my Stripe account for 3 days and I'm about to churn.",
"questions": {
"urgency": {"type": "noul", "instructions": "Does this message express urgency?"},
"team": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payment, invoices, subscription issues",
"technical": "Bugs, integrations, API errors",
"sales": None,
},
},
},
},
)
print(resp.json())const res = await fetch("https://apirouter.pleum.ai/v1/systemone", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PLEUM_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev-latest",
state: "Hi, I've been trying to connect my Stripe account for 3 days and I'm about to churn.",
questions: {
urgency: { type: "noul", instructions: "Does this message express urgency?" },
team: {
type: "choice",
instructions: "Which team should handle this?",
criteria: {
billing: "Payment, invoices, subscription issues",
technical: "Bugs, integrations, API errors",
sales: null,
},
},
},
}),
});
const data = await res.json();
console.log(data.answers.urgency.noul); // e.g. 0.999Authenticate with a plm_ API key in the Authorization: Bearer header.
Request body#
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Model ID, e.g. jev-latest. |
| state | string | object | array | Required | Content to evaluate — text, chat logs, records, app state. |
| questions | map<string, Question> | Required | Keys are question names; values are question objects. Must contain at least one entry. The key is only used to map answers back and is not sent to the model. |
| questions.*.type | "noul" | "choice" | "score" | Required | Question type — see Question types below. |
| questions.*.instructions | string | object | array | Required | The question itself. |
| questions.*.criteria | object | array | Optional | Per-type criteria — noul: {true, false} descriptions; choice: map from option to description (null allowed); score: ordered array of level descriptions (minimum two). |
curl https://apirouter.pleum.ai/v1/systemone \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "Hi, I'"'"'ve been trying to connect my Stripe account for 3 days.",
"questions": {
"urgency": {"type": "noul", "instructions": "Does this message express urgency?"}
}
}'Question types#
noul — true/false probability. Returns a noul value between 0 and 1.
choice — classification. Returns the top choice, probabilities summing to 1, and derived confidence.
score — rubric scoring. Returns the probability-weighted score (may land between levels), a legend, and probabilities.
Response#
answers returns one answer per question under the same key you chose. Questions are evaluated in parallel and isolation — decompose complex judgments into atomic questions and combine them in one call (official TypeSafe guidance). usage carries measured tokens; cost is a PleumRouter extension (KRW cost, FX rate, markup) and is included only once settlement has finished.
{
"model": "jev-latest",
"answers": {
"urgency": {"type": "noul", "noul": 0.999},
"team": {
"type": "choice",
"choice": "billing",
"probabilities": {"billing": 0.84, "technical": 0.159, "sales": 0.001},
"confidence": 0.84
}
},
"usage": {"input_tokens": 312, "output_tokens": 48},
"cost": {"usd": 0.000013104, "krw": 0.1, "fx_rate": 1345.69, "markup_rate": 0.0}
}Note: Jev is most accurate in English; CJK languages including Korean may be less accurate (official TypeSafe guidance). Write important states and instructions in English where possible.
Billing#
Billing is metered on the measured usage.input_tokens (output tokens are free). A conservative estimate holds credits at request time; settlement captures the measured amount.