System One
POST /v1/systemone
The same decisions as /v1/decisions, in the System One request shape used by TypeSafe Jev and Cloudflare Clef. Use it if your code already speaks that shape; every decision model works on both endpoints.
Endpoint
POST https://api.crossmodel.ai/v1/systemone
Authorization: Bearer cm-YOUR_KEY
Content-Type: application/jsonRequest
{
"model": "typesafe/jev",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"urgent": { "type": "noul", "instructions": "Does this message convey urgency?" },
"team": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": { "billing": "Payments and payouts", "technical": null, "sales": null }
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["No sign of frustration", "Clearly unhappy", "Threatening to leave or complain"]
}
}
}| Parameter | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | A decision model ID, e.g. typesafe/jev. |
state | string, object or array | Yes | The content to decide about. An array may mix { "type": "text", "text" } and { "type": "image_url", "image_url": { "url" } } parts. |
images | string[] | No | Image data URLs, appended after state. |
questions | object | Yes | Questions keyed by name. The key order is the question order. |
Any other top-level field is rejected with 400 unknown_parameter.
Question types
type | criteria | Answer |
|---|---|---|
noul | Optional object with true and / or false: what each answer means. | noul: the probability that the answer is yes. |
choice | Object whose keys are the options and whose values are descriptions (or null). | The chosen choice, a confidence, and a probability per option. |
score | Array of level descriptions, lowest first. | A score (the expected level index, 0 to the number of levels minus 1), a confidence, a legend, and a probability per level. |
Response
{
"model": "typesafe/jev",
"answers": {
"urgent": { "type": "noul", "noul": 0.97 },
"team": {
"type": "choice",
"choice": "billing",
"confidence": 0.91,
"probabilities": { "billing": 0.93, "technical": 0.06, "sales": 0.01 }
},
"frustration": {
"type": "score",
"score": 1.42,
"confidence": 0.64,
"legend": {
"0": "No sign of frustration",
"1": "Clearly unhappy",
"2": "Threatening to leave or complain"
},
"probabilities": { "0": 0.03, "1": 0.52, "2": 0.45 }
}
},
"usage": { "input_tokens": 148, "output_tokens": 0 }
}Answers are keyed by the same names as the questions. If a model declines one question, that answer is { "type": "refusal" }, optionally with a reason.
How the two shapes map
/v1/decisions | /v1/systemone |
|---|---|
input | state (plus images) |
questions array with name | questions object keyed by name |
predicate | noul |
choices[].value / description | criteria keys / values |
levels[].label / description | criteria array entries |
answers array | answers object |
usage.total_tokens | not present |
Billing and errors are the same as on /v1/decisions.