Skip to main content
POST
Select a model

Authorizations

Authorization
string
header
required

An API key (otsk_ + 64 hex) or a console session token.

Headers

Idempotency-Key
string | null

Optional. Replaying a key returns the stored classification and never charges twice.

Body

application/json

A selection request: the task, as prompt or as messages (exactly one).

prompt
string | null

The task. Bodies up to 4 MiB are accepted; only the head and tail of the task are read to classify it.

messages
object[]

The task as conversation turns, joined into one text as for prompt.

policy
string | null

balanced (default), cost_efficient, capability_heavy or domain_skills. Anything else is 400 invalid_policy.

Example:

"balanced"

domain
string | null

v1 override: route as this domain's default task type (coding, math, reasoning, knowledge, agentic, long_context, writing, multilingual or general). The task type is then not classified; difficulty and the facets still are.

task_type
string | null

Skip task-type classification and route as this task type (see GET /v1/router/task-types). Wins over domain.

Example:

"code_generation"

latency
string | null

interactive, standard (default) or batch: how much estimated latency weighs in balanced.

Example:

"standard"

max_latency_ms
number<double> | null

Drop models whose estimated time to the full answer exceeds this, or whose speed is not measured.

weights
null | object

balanced only: replaces the quality, cost and latency weights. With any other policy it is 400 weights_require_balanced.

models
null | object

Filters over the catalog. All optional; an empty object keeps every model.

Response

The selected model, the classification and the ranking

id
string
required

rtr_ plus the uuid of the classification run.

Example:

"rtr_0f8e3c1a9b2d4e5f8a7b6c5d4e3f2a1b"

run_id
string
required

The classification run, readable at /v1/runs/{run_id} and in usage.

policy
string
required
model
object
required

A model, as a selection names it.

classification
object
required
ranking
object[]
required

Top candidates, best first, at most ten.

score_basis
enum<string>
required

Which benchmarks decided. v2 always decides on the task's weighted benchmark vector; domain and intelligence are the v1 values.

Available options:
domain,
intelligence,
benchmarks
filters_applied
object[]
required

Filters that removed at least one model, in the order applied.

low_confidence
boolean
required

domain_skills with a most probable task type under 40%.

input_tokens_est
integer<int64>
required
Required range: x >= 0
reason
string
required
decision_model
string
required
Example:

"neon-1.1"

catalog_as_of
string
required

The catalog snapshot date.

benchmarks_as_of
string
required

The benchmark snapshot date.

replayed
boolean
required

True when an Idempotency-Key replayed a stored classification.

difficulty_floor
number<double> | null

v1 name for threshold.tau (balanced, cost_efficient).

threshold
null | object

The quality bar (balanced, cost_efficient).

usage
null | object

Tokens the run used.

cost_micros
integer<int64> | null
Required range: x >= 0