Create decisions
Beta. Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as state and define each entry in questions as:
noul: estimate the probability that a statement is true.choice: select an option from a set.score: rate the content on an ordered scale.box: locate one target in an image and return its bounding box. Beta, TypeSafejev-previewonly.
Instructions and criteria accept strings or structured JSON. TypeSafe models also accept inline images through assets (beta).
Use a native decision model or a supported chat model. Configure ordered fallbacks, optional retry, timeout.call_timeout in milliseconds, and an exact-match cache. Each retry and fallback gets a fresh timeout; omit retry to move directly to the next fallback on timeout. The response identifies the model that answered.
Requires the classify API-key permission. PII plugins and guardrails are not applied. See the Decisions guide for supported models, probability interpretation, and refusals.
orq.router.decisions.create() in the Node and Python SDKs.
classify API-key permission.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
ID of a model that supports native or emulated classify, including openai/gpt-6-luna.
Typed questions keyed by an identifier of your choice. Each answer is returned under the same key. Native OpenAI accepts 1 to 400 questions.
The content to evaluate. A string, an object or an array. For TypeSafe models, reference images declared in assets by writing their reference string. Native OpenAI accepts messages and function/custom-tool history. User messages support input_text, input_image and input_json; images can use inline base64 data URLs or public HTTP(S) URLs. At most 128 images across state and question instructions. Shared text/image parts support explicit prompt_cache_breakpoint markers. File IDs, audio, item references and bare content parts are unsupported. Other objects and arrays are serialized as text.
Beta, TypeSafe models only. Inline images keyed by a reference string. Write the reference in state, instructions or criteria wherever the image belongs; every asset must be referenced. Required for box questions.
Exact-match response cache for this request. An identical request body from the same workspace and project is served from the stored response, with the X-Cache header reporting HIT or MISS.
HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.
20Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Requests with images in state require native OpenAI image-capable fallbacks; requests with assets or box questions require TypeSafe fallbacks.
10The identity to attach to the trace.
Key-value metadata attached to the trace.
The name to display on the trace. If not specified, the default system name will be used.
Native OpenAI only. Partitions reuse of shared input across requests.
64Native OpenAI prompt caching controls. Separate from the gateway exact-match response cache.
Retry configuration for the request.
Timeout for each model call, including every retry and fallback. A timed-out call returns 408 and advances to the next fallback after configured retries are exhausted.
Response
Returns one answer per question.
Answers keyed by the question identifiers from the request.
The requested ID of the model that answered. This can be a fallback model.
The usage information for the request.
OpenTelemetry trace and span identifiers for this request.