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
Swarms format: the body carries the job id, the version that answered and the cost.
Questions 3
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.
| Model | Provider | Input / 1M | Output / 1M | 10,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
noulA 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
choicePick 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
scoreRate 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/completionsAsk questions about a state, in the Swarms format. model_name is optional and defaults to jev-latest.
POST/v1/systemoneThe same completion in the TypeSafe API format. model is required; the job id and cost come back in headers.
GET/v1/decision/modelsEvery decision model and its price per 1M tokens.
GET/v1/modelsThe same list for the TypeSafe SDKs, when sent with an X-TypeSafe-SDK header.
Guides
Worked examples in the Swarms API docs.
Decision Model Completion
One request with a noul, a choice and a score question.
List Decision Models and Estimate Costs
Live prices, pinned versions and cost math.
SystemOne: Use the TypeSafe Format
Bearer auth, response headers and the TypeSafe model list.
Gate and Judge an Agent
Decide whether to run an agent, then grade its answer.
Pick a Swarm and the Best Draft
Choose the swarm type, then the winning output.