Decision Models

Execute Decision Model Completion (TypeSafe API)

Changed on

Decision model completions in the TypeSafe API's exact request and response format, so the TypeSafe SDKs work with base_url set to this API. Billed like POST /v1/decision/completions; the charge is in the x-swarms-total-cost header.

post/v1/systemone

Request

  • Base URL
    https://api.swarms.world
  • URL
    https://api.swarms.world/v1/systemone
  • 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.

modelstring 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

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.

Changes