POST /v1/decisions
The OpenAI Decisions shape. Send an input (the thing being judged) plus an
array of questions; each question has a type and a name. shrug.ai answers
every question with a random draw and returns calibrated probabilities.
POST /v1/decisions
Authorization: Bearer shrug_sk_your_key_here
Content-Type: application/json
Question types
| type | Shape | Answer field |
|---|---|---|
| choice | choices: [{ value, description }] | choice + probabilities[] |
| predicate | instructions | probability (p of true) |
| score | levels: [{ label, description }] | score (index) + probabilities[] |
An optional shrug.distributions block biases the draw — see the
density extension.
Request
This is the canonical request fixture, including a shrug.distributions block
that weights the color choice and sets p_true for the is_daytime
predicate:
{
"model": "gpt-6-luna",
"input": "the sky at noon",
"questions": [
{ "type": "choice", "name": "color",
"choices": [
{ "value": "red", "description": "warm" },
{ "value": "blue", "description": "cool" },
{ "value": "green", "description": "earthy" }
] },
{ "type": "predicate", "name": "is_daytime", "instructions": "is it day?" },
{ "type": "score", "name": "brightness",
"levels": [
{ "label": "dim", "description": "low" },
{ "label": "bright", "description": "high" }
] }
],
"shrug": {
"distributions": {
"color": { "weights": { "red": 0.5, "blue": 0.3, "green": 0.2 } },
"is_daytime": { "p_true": 0.7 }
}
}
}
Response
Each answer echoes its type and name. A choice returns the drawn choice
with a probabilities array and a confidence; a predicate returns a single
probability; a score returns the drawn score index with per-level
probabilities. usage reports token accounting (always zero — there is no
model).
{
"answers": [
{ "type": "choice", "name": "color", "choice": "red",
"probabilities": [
{ "value": "red", "probability": 0.5 },
{ "value": "blue", "probability": 0.3 },
{ "value": "green", "probability": 0.2 }
],
"confidence": 0.5 },
{ "type": "predicate", "name": "is_daytime", "probability": 0.7 },
{ "type": "score", "name": "brightness", "score": 1,
"probabilities": [
{ "value": 0, "label": "dim", "probability": 0.4 },
{ "value": 1, "label": "bright", "probability": 0.6 }
],
"confidence": 0.6 }
],
"usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 } }
}
The TypeSafe System One shape (POST /v1/systemone) expresses the same request and answers with keyed objects instead of arrays.