Submit a Decisions request
Changed onAsks a Decisions model typed questions (noul, choice, score, box) about the content in state and returns one typed answer per question with its probabilities. Images, audio and video go in state as image_url, input_audio and video_url parts; PNG and JPEG images can instead go once in assets and be referenced by key. Which question types, media parts and asset references an endpoint accepts depends on the provider; a request an endpoint cannot serve fails with 400 before anything is sent upstream. See the Multimodal Decisions guide for the per-provider table. Typed fields (text, numbers, dates, lists, estimates, forecasts) come from POST /api/alpha/extractions, which takes the same envelope with fields in place of questions (text state only; images and PDFs go in assets). Alpha: the shape may change.
Request
- Base URLhttps://openrouter.ai
- AuthHTTP bearer
Request body
Images keyed by reference string, as in TypeSafe's API. Write a reference wherever the image belongs in state, instructions, or criteria; every asset must be referenced at least once, or the request fails with 400 naming the unused key. TypeSafe Jev endpoints receive assets as written and read a reference as a whole string value or inside longer text. Every other provider has each whole-string reference resolved to an image_url part before the request is sent, so it is accepted only where that provider reads image_url parts (top-level state items), and a reference inside longer text fails with 400. image_url parts and assets can be mixed in one request.
Provider routing preferences for the request.
A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
The content to evaluate: a plain string, or a JSON object or array of related context.
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
Example request
{
"provider": {
"allow_fallbacks": true
},
"session_id": "session-1234",
"trace": {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
}
}Response
Decisions response
Sources for the request as a whole, when the provider returns them. Not attributed to individual answers.
Example response
{
"usage": {
"cost_details": {
"upstream_inference_completions_cost": 0.0004,
"upstream_inference_cost": null,
"upstream_inference_prompt_cost": 0.0008
}
}
}Changes
- info
added the new optional request property
provider/allOf[#/components/schemas/ProviderPreferences]/options/celeris - info
added the new
Celerisenum value to the request propertyprovider/allOf[#/components/schemas/ProviderPreferences]/ignore/items/anyOf[#/components/schemas/ProviderName] - info
added the new
Celerisenum value to the request propertyprovider/allOf[#/components/schemas/ProviderPreferences]/only/items/anyOf[#/components/schemas/ProviderName]
1 more change in this revision
- info