Skip to main content
POST
Switch a model

Authorizations

Authorization
string
header
required

Create an API key in the console. Required when accounts are enabled.

Path Parameters

model
string
required

Body

application/json
on
boolean
required
switch_off
string[]

Families, such as router, and models, such as router@2, to switch off in the same step, to make room when switching on would pass the account's limit (live_limit).

Maximum array length: 20
adapter
string

The id of the model the caller saw: refused unless the model called is still that one.

Maximum string length: 140

Response

Successful Response

A base, an early-access catalogue entry, or a trained adapter.

id
string
required
status
string
required
evaluation_key
string
required
name
string
description
string
family
string
size_order
integer
kind
string
lora
string | null
metrics
Metrics · object | null
max_prompt_tokens
integer
max_questions
integer
calibration
string
availability_reason
string

Why it can't answer now: no_engine (its pool has no engine right now), not_served (this server doesn't serve it), or, for an adapter, base_mismatch, engine_unconfigured or engine_changed.

available
boolean
access_requested
boolean
adapter_capacity
AdapterCapacity · object | null
created_at
number
deleted_at
number

When its owner deleted it. A deleted model answers and runs nothing.

discarded_at
number

When a rollback of its family discarded it. A discarded model answers and runs nothing.

on_at
number | null

When its own switch went on: it answers calls to its number, such as router@4. Null while it is off.

keep_warm
boolean

Whether it is kept warm on its own switch. A family's keep warm doesn't set it: see keep_warm_window.

keep_warm_window
KeepWarmWindow · object | null

The hour of keep warm being billed for it, through its family or its own switch, or null when nothing is billed.

keep_warm_stopped_at
number | null

When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.

used_at
number | null

Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.

switches_off_at
number | null

When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.

off_reason
enum<string> | null

Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.

Available options:
owner,
idle
off_at
number | null

When it went off, with off_reason. Null otherwise.

job_id
string
model_name
string | null
version
integer
parent
string | null
residency
Residency · object
state
enum<string> | null
Available options:
loaded,
loading,
asleep
decision_price_nano
string | null

Exact integer string of nano-USD per billed input token from the current billing policy. Zero means free; null means unpriced.

base
string

An adapter's base model id: the base whose prices it pays.

evaluation_set
EvaluationSet · object | null
request_latency
RequestLatency · object