Skip to main content
POST
Execute Decision Model Completion (TypeSafe API)

Headers

x-api-key
string
required

Body

application/json
state
required

The content every question is asked about: text, a JSON object or a list.

questions
Questions · object
required

Questions keyed by a name you choose. The answers come back under the same names.

model
string
required

Decision model that answers the questions, as in the TypeSafe API. GET /v1/decision/models lists the available models and their prices.

Response

Successful Response

model
string
required

The model version that answered, which may differ from an alias such as jev-latest.

answers
Answers · object
required

Answers keyed by question name. A choice answer has choice, probabilities and confidence; a score answer has score, legend, probabilities and confidence; a noul answer has noul, the probability from 0 to 1.

usage
SystemOneUsage · object
required

Token counts for this request. The amount charged is in the x-swarms-total-cost header.