Skip to content

The /v1/systemone API

POST /v1/systemone takes one request, a state and the questions about it, and returns one typed answer per question.

Request

Field Type What it holds
state any JSON what the questions are about: a string, an object or a list
questions object one question per key; the key names its answer
model string optional; the served model's name or one of its aliases
media list OneJev only: images and videos the state refers to by <image:N> and <video:N>
images list chat models: data URLs or base64, shown ahead of the text

Extra keys are accepted and ignored. A request needs at least one question.

{
  "state": "Order #1182 arrived with a cracked screen. The customer asks for a refund and attached two photos.",
  "questions": {
    "action": {"type": "choice", "instructions": "What should support do next?",
               "criteria": {"refund": "refund the order", "replace": "send a replacement", "escalate": "ask a human"}},
    "urgent": {"type": "noul", "instructions": "Does this need a reply within the hour?"}
  }
}

Questions

Every question has a type, instructions and, for a choice or a score, criteria.

Type criteria Answer
noul optional {"true": ..., "false": ...}, what each outcome means the probability that the statement holds
choice object of option name to description, up to 256 options the most likely option and every option's probability
score list of levels, up to 256 the expected level and every level's probability

Instructions, descriptions and levels may be strings or any JSON. Each model family reads up to its own number of options and levels, given on its page in Supported models; a larger question gets a 422.

"severity": {"type": "score", "instructions": "How serious is the problem?",
             "criteria": ["cosmetic", "annoying", "product unusable"]}

Response

Qwen3.5-4B answered the request above with these answers. The server's own record under meta is left out.

{
  "model": "Qwen3.5-4B",
  "answers": {
    "action": {
      "type": "choice",
      "choice": "refund",
      "probabilities": {
        "refund": 0.777006,
        "replace": 0.208265,
        "escalate": 0.014729
      },
      "confidence": 0.665509
    },
    "urgent": {
      "type": "noul",
      "noul": 0.827155
    }
  },
  "usage": {
    "input_tokens": 110,
    "output_tokens": 2
  }
}
Answer field Type Meaning
noul number probability that the statement holds
choice string the option with the highest probability
score number expected level, from 0 to the number of levels minus 1
probabilities object each option's, or each level's, probability; they sum to 1
confidence number 0 when the probabilities are uniform, 1 when one option holds them all
legend object the levels of a score by their index

usage counts the tokens the request took, the state once plus every question, as input_tokens, and one output token per question. The response also carries the server's own record under meta (onejev for OneJev): the time spent planning, waiting and computing, and whether the request ran in a CUDA graph.

A choice's confidence is its top probability rescaled from uniform to certain, (p_max − 1/k) / (1 − 1/k) for k options. A score's confidence is 1 minus the expected distance from the most likely level, divided by the same distance for a uniform spread.

Query parameters

Parameter What it does
debias=N OneJev: asks each question in N cyclic shifts of its options and combines them

Errors

Status When
422 the body is not valid JSON, a field has the wrong shape, a question has more options than the model reads, or the request is too long for the model
404 model names a model this server does not serve
500 the server failed while answering

A 422 lists the problems in detail, each with the place in the body (loc) and a message (msg). A request with images on a machine without torchvision gets a 500 whose detail says how to install it.

Other endpoints

Endpoint What it returns
GET /health {"status": "ok"} with the model, its family and the Flide version; 503 while the model loads
GET /v1/models the served model and its aliases
POST /flush_cache empties the session cache (GET works too)
GET / a page to try requests in the browser