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/json

Request

{
  "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"]
    }
  }
}
ParameterTypeRequiredNotes
modelstringYesA decision model ID, e.g. typesafe/jev.
statestring, object or arrayYesThe content to decide about. An array may mix { "type": "text", "text" } and { "type": "image_url", "image_url": { "url" } } parts.
imagesstring[]NoImage data URLs, appended after state.
questionsobjectYesQuestions keyed by name. The key order is the question order.

Any other top-level field is rejected with 400 unknown_parameter.

Question types

typecriteriaAnswer
noulOptional object with true and / or false: what each answer means.noul: the probability that the answer is yes.
choiceObject whose keys are the options and whose values are descriptions (or null).The chosen choice, a confidence, and a probability per option.
scoreArray 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
inputstate (plus images)
questions array with namequestions object keyed by name
predicatenoul
choices[].value / descriptioncriteria keys / values
levels[].label / descriptioncriteria array entries
answers arrayanswers object
usage.total_tokensnot present

Billing and errors are the same as on /v1/decisions.