Decision Models

Execute Decision Model Completion

Changed on

Ask a decision model typed questions about a state and get calibrated probabilities back instead of generated text.

post/v1/decision/completions

Request

  • Base URL
    https://api.swarms.world
  • URL
    https://api.swarms.world/v1/decision/completions
  • Auth
    none declared. Required headers: x-api-key

Headers

x-api-keystring required

Request body

questionsobject required

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

model_namestring

Decision model that answers the questions; also accepted as model. GET /v1/decision/models lists the available models and their prices.

Response

Successful Response

job_idstring required

Unique identifier for this completion.

statusstring required

Status of the request, success when completed.

model_namestring required

The decision model requested.

modelstring required

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

answersobject 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.

timestampstring required

ISO 8601 time the completion finished.

Changes