Run decisions
Score fixed outcomes for each decision against one shared context. Inspect each result’s probabilities and policy before acting, and check the returned model and fallback details. Scores are normalized across the outcomes you supply; they are not a guarantee that the selected outcome is correct.
Reuse an Idempotency-Key and identical body after a lost response. The original operation is replayed without executing or charging again. Responses are retained for 24 hours; afterward the same key returns an expired-response error.
The response example is a historical pilot recording from 26 September 2026; its model, timing and probabilities describe that run.
curl --request POST \
--url https://console.sqwish.ai/v1/decide \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "sqwish-d1-core",
"context": "Our billing export has failed for two days. We need it for today's audit.",
"decisions": [
{
"id": "team",
"kind": "single",
"question": "Which team should handle this ticket?",
"outcomes": {
"billing": "Charges, invoices, and financial exports.",
"technical": "Other application failures.",
"sales": "New purchases."
}
},
{
"id": "urgent",
"kind": "binary",
"question": "Does the ticket state a deadline within one day?",
"outcomes": {
"yes": "An explicit deadline is today or within the next 24 hours.",
"no": "The deadline is later, absent, or unclear."
}
},
{
"id": "impact",
"kind": "ordinal",
"question": "How severe is the reported impact on the customer's work?",
"outcomes": [
"0",
"1",
"2"
],
"rubric": [
"Minor inconvenience; the task can still be completed.",
"The task is impaired, but a workable alternative is stated.",
"An important task is blocked and no workable alternative is stated."
]
}
]
}
EOFimport requests
url = "https://console.sqwish.ai/v1/decide"
payload = {
"model": "sqwish-d1-core",
"context": "Our billing export has failed for two days. We need it for today's audit.",
"decisions": [
{
"id": "team",
"kind": "single",
"question": "Which team should handle this ticket?",
"outcomes": {
"billing": "Charges, invoices, and financial exports.",
"technical": "Other application failures.",
"sales": "New purchases."
}
},
{
"id": "urgent",
"kind": "binary",
"question": "Does the ticket state a deadline within one day?",
"outcomes": {
"yes": "An explicit deadline is today or within the next 24 hours.",
"no": "The deadline is later, absent, or unclear."
}
},
{
"id": "impact",
"kind": "ordinal",
"question": "How severe is the reported impact on the customer's work?",
"outcomes": ["0", "1", "2"],
"rubric": ["Minor inconvenience; the task can still be completed.", "The task is impaired, but a workable alternative is stated.", "An important task is blocked and no workable alternative is stated."]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'sqwish-d1-core',
context: 'Our billing export has failed for two days. We need it for today\'s audit.',
decisions: [
{
id: 'team',
kind: 'single',
question: 'Which team should handle this ticket?',
outcomes: {
billing: 'Charges, invoices, and financial exports.',
technical: 'Other application failures.',
sales: 'New purchases.'
}
},
{
id: 'urgent',
kind: 'binary',
question: 'Does the ticket state a deadline within one day?',
outcomes: {
yes: 'An explicit deadline is today or within the next 24 hours.',
no: 'The deadline is later, absent, or unclear.'
}
},
{
id: 'impact',
kind: 'ordinal',
question: 'How severe is the reported impact on the customer\'s work?',
outcomes: ['0', '1', '2'],
rubric: [
'Minor inconvenience; the task can still be completed.',
'The task is impaired, but a workable alternative is stated.',
'An important task is blocked and no workable alternative is stated.'
]
}
]
})
};
fetch('https://console.sqwish.ai/v1/decide', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "dec_963b7180cbd24e69a09870f8",
"model": "sqwish-d1-core",
"decisions": {
"team": {
"kind": "single",
"probabilities": {
"billing": 0.9268172836638902,
"technical": 0.05394723671050278,
"sales": 0.019235479625606948
},
"top": "billing",
"p_top": 0.9268172836638902,
"margin": 0.8728700469533874,
"entropy": 0.3039487736089271,
"action": "billing",
"abstained": false
},
"urgent": {
"kind": "binary",
"probabilities": {
"yes": 0.9124361664296878,
"no": 0.08756383357031215
},
"top": "yes",
"p_top": 0.9124361664296878,
"margin": 0.8248723328593757,
"entropy": 0.2968648920244629,
"p_yes": 0.9124361664296878,
"action": "yes",
"abstained": false
},
"impact": {
"kind": "ordinal",
"probabilities": {
"0": 0.05066966056527368,
"1": 0.105604641144301,
"2": 0.8437256982904253
},
"top": "2",
"p_top": 0.8437256982904253,
"margin": 0.7381210571461243,
"entropy": 0.5318959230835276,
"expected_level": 1.7930560377251517,
"legend": {
"0": "Minor inconvenience; the task can still be completed.",
"1": "The task is impaired, but a workable alternative is stated.",
"2": "An important task is blocked and no workable alternative is stated."
},
"median_level": "2",
"action": "2",
"abstained": false
}
},
"render": {
"layout": "idea061",
"reads": 2,
"independent": false
},
"usage": {
"input_tokens": 648,
"decisions": 3
},
"timing_ms": {
"render": 3.829091787338257,
"score": 221.20973281562328
},
"provenance": {
"base_model": "Qwen/Qwen3.5-9B",
"base_revision": "c202236235762e1c871ad0ccb60c8ee5ba337b9a",
"base_id": "d1-core-pilot-640",
"base_artifact_sha256": "65fadf0bf136811e06198a7dd97ee47559d63f2fdafb64a9ec48306ba53f2333",
"compute_dtype": "float16",
"serving_artifact_sha256": null,
"serving_master_artifact_sha256": null,
"serving_execution_artifact_sha256": null,
"engine_dtype": "float16",
"engine_quantization": null,
"adapter": null,
"artifact_sha256": null,
"probabilities": "conditional_on_declared_outcomes",
"calibration": "not_established"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Headers
Reuse the same key and body after a lost response. A successful replay does not execute or charge again. Changed request bodies conflict; expired replay bodies are not executed again under the old key.
1 - 255^[!-~]+$Body
1 - 64 elementsShow child attributes
Show child attributes
1 - 128Show child attributes
Show child attributes
auto, none Response
One probability distribution for each decision.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request POST \
--url https://console.sqwish.ai/v1/decide \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "sqwish-d1-core",
"context": "Our billing export has failed for two days. We need it for today's audit.",
"decisions": [
{
"id": "team",
"kind": "single",
"question": "Which team should handle this ticket?",
"outcomes": {
"billing": "Charges, invoices, and financial exports.",
"technical": "Other application failures.",
"sales": "New purchases."
}
},
{
"id": "urgent",
"kind": "binary",
"question": "Does the ticket state a deadline within one day?",
"outcomes": {
"yes": "An explicit deadline is today or within the next 24 hours.",
"no": "The deadline is later, absent, or unclear."
}
},
{
"id": "impact",
"kind": "ordinal",
"question": "How severe is the reported impact on the customer's work?",
"outcomes": [
"0",
"1",
"2"
],
"rubric": [
"Minor inconvenience; the task can still be completed.",
"The task is impaired, but a workable alternative is stated.",
"An important task is blocked and no workable alternative is stated."
]
}
]
}
EOFimport requests
url = "https://console.sqwish.ai/v1/decide"
payload = {
"model": "sqwish-d1-core",
"context": "Our billing export has failed for two days. We need it for today's audit.",
"decisions": [
{
"id": "team",
"kind": "single",
"question": "Which team should handle this ticket?",
"outcomes": {
"billing": "Charges, invoices, and financial exports.",
"technical": "Other application failures.",
"sales": "New purchases."
}
},
{
"id": "urgent",
"kind": "binary",
"question": "Does the ticket state a deadline within one day?",
"outcomes": {
"yes": "An explicit deadline is today or within the next 24 hours.",
"no": "The deadline is later, absent, or unclear."
}
},
{
"id": "impact",
"kind": "ordinal",
"question": "How severe is the reported impact on the customer's work?",
"outcomes": ["0", "1", "2"],
"rubric": ["Minor inconvenience; the task can still be completed.", "The task is impaired, but a workable alternative is stated.", "An important task is blocked and no workable alternative is stated."]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'sqwish-d1-core',
context: 'Our billing export has failed for two days. We need it for today\'s audit.',
decisions: [
{
id: 'team',
kind: 'single',
question: 'Which team should handle this ticket?',
outcomes: {
billing: 'Charges, invoices, and financial exports.',
technical: 'Other application failures.',
sales: 'New purchases.'
}
},
{
id: 'urgent',
kind: 'binary',
question: 'Does the ticket state a deadline within one day?',
outcomes: {
yes: 'An explicit deadline is today or within the next 24 hours.',
no: 'The deadline is later, absent, or unclear.'
}
},
{
id: 'impact',
kind: 'ordinal',
question: 'How severe is the reported impact on the customer\'s work?',
outcomes: ['0', '1', '2'],
rubric: [
'Minor inconvenience; the task can still be completed.',
'The task is impaired, but a workable alternative is stated.',
'An important task is blocked and no workable alternative is stated.'
]
}
]
})
};
fetch('https://console.sqwish.ai/v1/decide', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "dec_963b7180cbd24e69a09870f8",
"model": "sqwish-d1-core",
"decisions": {
"team": {
"kind": "single",
"probabilities": {
"billing": 0.9268172836638902,
"technical": 0.05394723671050278,
"sales": 0.019235479625606948
},
"top": "billing",
"p_top": 0.9268172836638902,
"margin": 0.8728700469533874,
"entropy": 0.3039487736089271,
"action": "billing",
"abstained": false
},
"urgent": {
"kind": "binary",
"probabilities": {
"yes": 0.9124361664296878,
"no": 0.08756383357031215
},
"top": "yes",
"p_top": 0.9124361664296878,
"margin": 0.8248723328593757,
"entropy": 0.2968648920244629,
"p_yes": 0.9124361664296878,
"action": "yes",
"abstained": false
},
"impact": {
"kind": "ordinal",
"probabilities": {
"0": 0.05066966056527368,
"1": 0.105604641144301,
"2": 0.8437256982904253
},
"top": "2",
"p_top": 0.8437256982904253,
"margin": 0.7381210571461243,
"entropy": 0.5318959230835276,
"expected_level": 1.7930560377251517,
"legend": {
"0": "Minor inconvenience; the task can still be completed.",
"1": "The task is impaired, but a workable alternative is stated.",
"2": "An important task is blocked and no workable alternative is stated."
},
"median_level": "2",
"action": "2",
"abstained": false
}
},
"render": {
"layout": "idea061",
"reads": 2,
"independent": false
},
"usage": {
"input_tokens": 648,
"decisions": 3
},
"timing_ms": {
"render": 3.829091787338257,
"score": 221.20973281562328
},
"provenance": {
"base_model": "Qwen/Qwen3.5-9B",
"base_revision": "c202236235762e1c871ad0ccb60c8ee5ba337b9a",
"base_id": "d1-core-pilot-640",
"base_artifact_sha256": "65fadf0bf136811e06198a7dd97ee47559d63f2fdafb64a9ec48306ba53f2333",
"compute_dtype": "float16",
"serving_artifact_sha256": null,
"serving_master_artifact_sha256": null,
"serving_execution_artifact_sha256": null,
"engine_dtype": "float16",
"engine_quantization": null,
"adapter": null,
"artifact_sha256": null,
"probabilities": "conditional_on_declared_outcomes",
"calibration": "not_established"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}