Decisions API
One endpoint for decision models. Send a state and typed questions, name a model, and get back calibrated answers: a probability for yes/no, a choice with its distribution, or a score. The request shape is the same for every model.
-
01
Run it here
The playground calls the gateway for you. No API key.
-
02
Pick a model
Use the same request for any model in the table below. Jev is text only: it skips images and says so in
warnings. -
03
Ask questions
POST /v1/systemonewith up to 32 questions. Types:noul(yes/no),choice,score.
curl https://decisions.opendecisions.ai/api/decide \
-H "Content-Type: application/json" \
-d '{
"model": "cloudflare/clef-flash",
"state": "I was charged twice for my order.",
"questions": {
"duplicate": { "type": "noul", "instructions": "Does the message report a duplicate charge?" },
"team": { "type": "choice", "instructions": "Which team should handle it?",
"criteria": { "billing": "Payments and refunds", "support": "Technical help" } }
}
}'
| Model | Provider | Images |
|---|---|---|
cloudflare/clef | Cloudflare Workers AI | Yes |
cloudflare/clef-flash | Cloudflare Workers AI, lower latency | Yes |
openai/gpt-6-luna | OpenAI Decisions | Yes |
typesafe/jev | TypeSafe | No, images are skipped with a warning |
Also available: POST /v1/decisions (OpenAI Decisions request shape), GET /v1/models, GET /health. Up to 4 images (PNG, JPEG, or WebP), 4 MiB each, as data URLs in images.
Answer
Run a question to see the probability or choice, the distribution, confidence when the model sends it, warnings, and gateway versus provider time.