Skip to contentNewDeepSeek V4.1 Flash 1017 is now availableTry it now
Docs / System One

System One

Answer typed questions about a state with a decision model.

The System One API answers typed questions about a state in one request. Use it with a decision model. A decision model serves only POST /v1/systemone. It does not serve chat completions or text completions.

Endpoint

text
POST https://api.inference.net/v1/systemone

Send your API key in the Authorization: Bearer header, as for other endpoints. The response is one JSON object. The endpoint does not stream.

Request

FieldTypeRequiredDescription
modelstringYesThe identifier of a decision model.
statestring or objectYesThe input the questions are about.
questionsobjectYesOne or more questions, keyed by a question id that you choose. It must not be empty.

Each value in questions is an object with these fields:

FieldTypeRequiredDescription
typestringYesOne of noul, choice or score.
instructionsstringNoInstructions for this question.
criteriaanyNoCriteria for this question. The API sends it to the model unchanged.

The API sends other fields in the request body and in each question to the model unchanged.

curl
curl https://api.inference.net/v1/systemone \
  -H "Authorization: Bearer $INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<decision-model>",
    "state": "The customer asks for a refund for an order that arrived damaged.",
    "questions": {
      "is_refund_request": { "type": "noul" },
      "department": {
        "type": "choice",
        "instructions": "Pick the team that handles this ticket.",
        "criteria": ["billing", "shipping", "support"]
      }
    }
  }'

Response

FieldTypeDescription
modelstringThe model identifier you sent.
answersobjectOne answer for each question, keyed by the question id from the request. The shape of each answer depends on the question type and the model.
usage.input_tokensintegerThe number of input tokens the model read.
usage.output_tokensintegerThe number of output tokens. A decision generates no tokens, so this is 0.
json
{
  "model": "<decision-model>",
  "answers": {
    "is_refund_request": { "...": "..." },
    "department": { "...": "..." }
  },
  "usage": { "input_tokens": 41, "output_tokens": 0 }
}

The x-inference-id response header contains the generation id.

Billing

You pay for usage.input_tokens as prompt tokens. There are no completion tokens.

Errors

Errors use the same JSON shape as other endpoints: {"error": {"message": "...", "type": "..."}}.

StatusCause
400The body has no string model, no string or object state, or no non-empty questions object.
400A question is not an object, or its type is not noul, choice or score.
400The model is not a decision model. Call it with POST /v1/chat/completions or POST /v1/completions.
400You called a decision model with POST /v1/chat/completions or POST /v1/completions. Call it with POST /v1/systemone.
403Your team does not have access to the model.
404The model does not exist.