> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Decisions API schema reference

> Request and response fields for OpenRouter's Decisions API, with question-key limits and every answer type (noul, choice, score, box, refusal).

Field summary for [`POST /api/alpha/decisions`](https://openrouter.ai/docs/guides/features/decisions). The generated [API reference](https://openrouter.ai/docs/api/api-reference/alphadecisions/submit-a-decisions-request.md) is the full schema.

## Request schema reference

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Model slug (e.g. `typesafe/jev-1.14`, `cloudflare/clef-flash`). |
| `state` | string, object, or array | Yes | Context evaluated by the questions. Can be a string, JSON object, or array of structured values or text and media parts (`image_url`, `input_audio`, `video_url`, `file`; supported array items and media types vary by provider). |
| `questions` | object | Yes | Map of question keys to question specifications (`noul`, `choice`, `score`, `box`). |
| `assets` | object | No | Map of image keys to asset objects: `format` (`png`, `jpg`, or `jpeg`) and `data_base64` are required, `type` (`"image"`) is optional, and any other field fails with a `400`. Keys can't be empty or whitespace. `data_base64` is standard padded base64 with no `data:` prefix or whitespace. Every asset must be referenced at least once inside a `state` or question string value (object property names and strings inside media parts such as a `file` part's `filename` don't count); provider placement rules are in [Multimodal inputs](https://openrouter.ai/docs/guides/features/decisions.md#multimodal-inputs-state-parts-and-assets). |
| `provider` | object | No | [Provider routing preferences](https://openrouter.ai/docs/guides/routing/provider-selection.md), for example `order`, `only`, `ignore`, and `allow_fallbacks`. |
| `session_id` | string | No | Grouping identifier (max 256 chars) for observability in Broadcast and logs. |
| `trace` | object | No | Tracing metadata (`trace_id`, `trace_name`, `span_name`, `generation_name`, `parent_span_id`) for Broadcast observability. |
| `user` | string | No | End-user identifier (max 256 chars) for analytics. |

`state`, each question's `instructions`, and each value in a question's `criteria` can nest objects and arrays at most 64 levels deep. A request that nests any of them deeper fails with a `400` that names the field.

Some models restrict question keys and reject other keys with a `400`. A key of 1 to 64 ASCII letters, digits, underscores, and hyphens passes all of these rules:

* **Gemini Decision 1.** Keys are 1 to 64 characters of `A-Z`, `a-z`, `0-9`, `_`, and `-`.
* **Parallel Decisions Fast.** Keys contain only `A-Z`, `a-z`, `0-9`, `_`, and `-`.
* **HeyGen Decision and HeyGen Decision Turbo.** Keys can't contain a colon or a newline (`\n`), and can't start or end with whitespace. Spaces inside a key are fine.

## Response schema reference

| Field | Type | Required | Description |
| - | - | - | - |
| `id` | string | No | Unique generation ID (e.g. `gen-dec-...`). |
| `model` | string | Yes | Model identifier that served the request. |
| `provider` | string | No | Name of the upstream provider that served the request. |
| `answers` | object | Yes | Map of question keys to typed answer objects (`noul`, `choice`, `score`, `box`, or `refusal`). |
| `annotations` | array | No | Web source citations (`{ "type": "url_citation", "url_citation": { "url", "title"?, "content"? } }`, where only `url` is required) for the request as a whole, when returned by the provider. |
| `usage` | object | Yes | Token and cost accounting: `input_tokens`, `output_tokens`, optional `cost` (credits), optional `is_byok`, optional `input_tokens_details` (`{ cached_tokens }`), and optional nullable `cost_details`. |

Each value in `answers` is discriminated by `type`:

| `type` | Fields |
| - | - |
| `"noul"` | `noul` (number, `0.0`–`1.0` probability of `true`), optional `confidence` (number) |
| `"choice"` | `choice` (string, winning key), optional `probabilities` (map of key to number), optional `confidence` (number) |
| `"score"` | `score` (number, expected score on `0`–`N-1`, where N is the number of `criteria` entries), optional `probabilities` (map of index string to number), optional `legend` (map of index string to criteria), optional `confidence` (number) |
| `"box"` | `box` (`{ "top", "bottom", "left", "right" }` as fractions of image dimensions), optional `confidence` (number) |
| `"refusal"` | Provider declined to answer this question; no score or probabilities returned |

See [Handling provider refusals](https://openrouter.ai/docs/guides/features/decisions.md#handling-provider-refusals) for how to treat a `refusal`.
