Classify
Deprecated. Use POST /v3/router/decisions and orq.router.decisions.create() for new integrations. This endpoint remains available for backward compatibility with the same request and response contract.
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.
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.
The content to evaluate. A string, an object or an array. For TypeSafe models, reference images declared in assets by writing their reference string. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
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.
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.