Decisions API
A decision model reads a description of a situation and answers the questions you ask about it, each with a probability. Use it when you need a yes/no answer as a number you can threshold, rather than generated text.
POST
https://llm.siraya.ai/v1/decisions
Supported Models
| Model ID | Description |
|---|---|
microsoft-decision-1.1 |
Microsoft Decision 1.1: probability answers to criteria-based questions about a text state |
Request Parameters
Header
| Parameter | Type | Required | Details |
|---|---|---|---|
Authorization |
string | Yes | Your API Key (e.g., Bearer <API_KEY>) |
Content-Type |
string | Yes | application/json |
Body
| Parameter | Type | Required | Details |
|---|---|---|---|
model |
string | Yes | microsoft-decision-1.1 |
state |
string | Yes | The situation to judge, in plain text |
questions |
object | Yes | The questions to answer, keyed by a name you choose. The same names come back in answers |
questions.<name>.type |
string | Yes | noul: a two-way question answered with the probability that the true criterion holds |
questions.<name>.criteria |
object | Yes | {"true": "<when the answer is yes>", "false": "<when the answer is no>"}, each a plain-language description |
questions can hold several questions about the same state. Each gets its
own entry in answers.
The body is passed to the model as written, with only model checked before
routing.
Code Examples
curl https://llm.siraya.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "microsoft-decision-1.1",
"state": "The deploy pipeline finished and all integration tests are green. The team needs to decide whether to promote the build to production tonight.",
"questions": {
"ship": {
"type": "noul",
"criteria": {
"true": "the release is safe to promote",
"false": "the release should be held"
}
}
}
}'
import requests
url = "https://llm.siraya.ai/v1/decisions"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>",
}
data = {
"model": "microsoft-decision-1.1",
"state": "The deploy pipeline finished and all integration tests are green. "
"The team needs to decide whether to promote the build to production tonight.",
"questions": {
"ship": {
"type": "noul",
"criteria": {
"true": "the release is safe to promote",
"false": "the release should be held",
},
}
},
}
response = requests.post(url, headers=headers, json=data)
print(response.json()["answers"]["ship"]["noul"])
No SDK equivalent
The OpenAI and Anthropic SDKs have no method for /v1/decisions, so the
examples use plain HTTP requests.
Response
{
"model": "microsoft-decision-1.1",
"answers": {
"ship": { "type": "noul", "noul": 0.8984224029975848 }
},
"usage": { "input_tokens": 57, "output_tokens": 1 }
}
| Field | Meaning |
|---|---|
model |
The model ID you sent |
answers.<name> |
One entry per question, under the name you gave it |
answers.<name>.type |
The question type, echoed |
answers.<name>.noul |
Probability, from 0 to 1, that the true criterion holds. It is returned at full precision, so apply your own threshold |
usage.input_tokens |
Tokens in the request |
usage.output_tokens |
Tokens produced |
Errors
| Status | Meaning |
|---|---|
400 |
The body is not a JSON object, or model is missing (model is required) |
4xx from the model |
A missing state or questions, or an unsupported question type. The message names the problem |
429 |
Account balance exhausted, or rate limited |