Skip to main content
Classify is in Beta. Its request and response contract matches the TypeSafe Classify API 1:1. The only available model is typesafe/jev-latest. Output tokens are free. Classify does not apply PII plugins, guardrails, or evaluators yet. API keys need the standard classify permission.

Overview

Call POST /classify on the AI Gateway base URL, https://my.orq.ai/v3/router. Send a string, object, or array as state, along with a set of named questions. The response contains one structured answer for each question. Questions can return the probability that a statement is true (noul), select one option from a rubric (choice), or place the input on an ordered scale (score). Because the result is calibrated and structured rather than free-form text, Classify works well for routing, triage, labeling, and scoring.

Quick start

Request

Each question has a type and instructions, which can be a string, object, or array. The shape of criteria depends on the question type.

Question types

noul

Returns the calibrated probability that the statement in instructions is true for state. The optional criteria object can define what counts as true and false.
JSON

choice

Selects one option from a rubric. The required criteria object maps each option name to a description. Set a description to null when the option name is enough for the model to interpret it.
JSON

score

Returns a position on an ordered scale. Set criteria to an array with at least two level descriptions, ordered from lowest to highest. The answer index refers to this array.
JSON

Response

JSON

Gateway controls during the Beta

Classify uses the same gateway pipeline as other router endpoints, but some controls do not support Classify yet. The table shows what currently applies. During the Beta, Classify does not apply plugins or guardrails, even when a routing or guardrail rule matches the request. The changelog will announce support before these controls are enabled.

Pricing and limits

  • Input tokens are billed at $0.042 per 1M tokens. Output tokens are free.
  • The context window is 64k tokens. The combined size of state and the longest question must fit within 32k tokens.

Errors