Build

Decision Models

Ask typed questions about any text and get calibrated probabilities back instead of prose: yes or no, pick one, or a score. Several questions share one request, and the text is billed once.

Request

Format

Swarms format: the body carries the job id, the version that answered and the cost.

77

Questions 3

Options
Levels, lowest first
0
1
2
3
3 questions · jev-latest

Nothing yet

Pick an example or write your own state and questions, then click Run. A request costs a few thousandths of a cent.

Request preview

curl -X POST 'https://api.swarms.world/v1/decision/completions' \  -H 'x-api-key: '"$SWARMS_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "model_name": "jev-latest",  "state": "Checkout has been failing for every customer since 9am. We are losing orders.",  "questions": {    "is_urgent": {      "type": "noul",      "instructions": "Is this urgent?"    },    "team": {      "type": "choice",      "instructions": "Which team should handle this?",      "criteria": {        "payments": "Checkout, billing, refunds",        "infra": "Outages, latency, servers"      }    },    "severity": {      "type": "score",      "instructions": "How severe is the impact?",      "criteria": [        "No impact",        "Minor",        "Major",        "Critical"      ]    }  }}'

Models and pricing

Live from /v1/decision/models. Prices are USD per 1M tokens. jev-latest is an alias; pin a listed version when answers must stay comparable over time.

ModelProviderInput / 1MOutput / 1M10,000 requests
Loading models…

The last column budgets 10,000 requests of about 400 input tokens each. Requests are billed to your Swarms credits.

Question types

Each question has a type, optional instructions saying what to decide, and criteria.

Noul

noul

A yes or no question.

Criteria. Optional. Only true and false, saying what counts as yes and as no. Needs instructions, criteria or both.

Answer. noul: the probability from 0 to 1 that the statement is true.

Choice

choice

Pick one option.

Criteria. Required. Each option’s name mapped to when it applies, or to null to go by the name alone.

Answer. choice, confidence, and probabilities for every option.

Score

score

Rate on an ordered scale.

Criteria. Required. At least one level, ordered from lowest to highest. The first level is 0.

Answer. score (the expected level), confidence, legend and probabilities.

Endpoints

Send your API key as x-api-key or Authorization: Bearer. You are charged only after the model answers; a failed request is free.

POST/v1/decision/completions

Ask questions about a state, in the Swarms format. model_name is optional and defaults to jev-latest.

POST/v1/systemone

The same completion in the TypeSafe API format. model is required; the job id and cost come back in headers.

GET/v1/decision/models

Every decision model and its price per 1M tokens.

GET/v1/models

The same list for the TypeSafe SDKs, when sent with an X-TypeSafe-SDK header.

Guides

Worked examples in the Swarms API docs.