Skip to main content
GET
JavaScript
Read one model. When you already know which one you want, this is faster and more exact than filtering the list.
The external_id: form is the one to use, since it is also what you set on a variation’s modelConfig.modelId. The canonical model_... ID works too. A missing ID is a 404.

What the record holds

The list-models page explains the two traps in full: prices are integer cents serialized as strings (parse, then divide by 100 to render), and maxInputTokens is what a variation’s compaction threshold is measured against, so it moves when you swap models. state matters before you point a variation at the model. A disabled model is a 400 on spec.model_id, so read it here first if a variation create is failing on the model.

List models

Every model, and the pricing and compaction details in full.

Create a variation

Where modelConfig.modelId takes the external_id: form.

Swap models on variations

Move a whole workspace off a model.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Workspace ID.

Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

id
string
required

Model ID

Example:

"model_01HXKD2E5NQM3T9AYWCFKJ4GED"

Response

OK

metadata
object
required

Resource metadata

spec
object
required

Model specification

state
enum<string>
required
read-only

Whether the model is usable in this workspace. Output only. Use the :enable and :disable actions to transition.

Available options:
STATE_UNSPECIFIED,
STATE_ENABLED,
STATE_DISABLED
info
object

Server-populated info (e.g. the AI provider this model routes through). Populated on reads when requested; see ListModelsRequest.include_info.