---
title: "List models"
method: GET
path: "/v1/workspaces/{workspaceId}/models"
tags: ["ModelService", "Models"]
---

# List models

`GET /v1/workspaces/{workspaceId}/models`

Lists all models in the workspace

## Path parameters

- `workspaceId` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `prefix` string
- `query` string
- `state` 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED', enum
- `aiProviderKeyId` string
- `bundleKey` string
- `sortOrder` string
- `includeInfo` boolean

## Response `200`

OK

- ListModelsResponse — List models response
  - `items` Model[]
    - `metadata` ResourceMetadata, required — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
      - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
      - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
      - `workspaceId` string, required — Workspace this resource belongs to for organizational grouping (prefixed ULID)
      - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
      - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
      - `labels` object — Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}
      - `profileId` string, required — ID of the actor (user or service account) that created this resource
      - `createdAt` string, date-time, required — Timestamp when this resource was created
      - `bundleKey` string — Optional bundle ownership key. When set, indicates the resource is managed by a configuration bundle identified by this key. Used by BulkWorkspaceResources.Apply to track which resources belong to which bundle for reconciliation / soft-delete on re-apply.
      - `updatedAt` string, date-time — Timestamp when this resource was last updated
    - `spec` ModelSpec, required
      - `provider` string — The model provider (e.g., "anthropic", "openai", "google")
      - `family` string — The model family (e.g., "claude-sonnet-4.6", "gpt-5.4", "gemini-2.5-flash")
      - `maxInputTokens` integer — Maximum number of input tokens the model supports
      - `maxOutputTokens` integer — Maximum number of output tokens the model can generate
      - `inputPricePerMillionTokens` string — Cost per million input tokens in cents (e.g., 300 = $3.00)
      - `outputPricePerMillionTokens` string — Cost per million output tokens in cents (e.g., 1500 = $15.00)
    - `info` ModelInfo — ModelInfo carries server-derived, read-only details about a model.
      - `provider` 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER', enum — The AI provider this model routes through (via its provider key).
      - `aiProviderKey` ResourceMetadata — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
        - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
        - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
        - `workspaceId` string, required — Workspace this resource belongs to for organizational grouping (prefixed ULID)
        - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
        - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
        - `labels` object — Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}
        - `profileId` string, required — ID of the actor (user or service account) that created this resource
        - `createdAt` string, date-time, required — Timestamp when this resource was created
        - `bundleKey` string — Optional bundle ownership key. When set, indicates the resource is managed by a configuration bundle identified by this key. Used by BulkWorkspaceResources.Apply to track which resources belong to which bundle for reconciliation / soft-delete on re-apply.
        - `updatedAt` string, date-time — Timestamp when this resource was last updated
      - `agentVariationCount` integer — Number of agent variations currently provisioned on this model. Useful for previewing how many variations a swap would affect.
    - `state` 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED', enum, required — Whether the model is usable in this workspace. Output only. Use the :enable and :disable actions to transition.
  - `pagination` Page
    - `nextCursor` string
    - `total` integer

## Other responses

- `default` — Default error response

## Changes

- **2026-06-09** `13d98d37dd96` — 2 warning, 4 info
  - deleted the `query` request parameter `status`
  - removed the optional property `items/items/spec/allOf[#/components/schemas/ModelSpec]/status` from the response with the `200` status
  - added the new optional `query` request parameter `state`
  - added the optional property `items/items/info/allOf[#/components/schemas/ModelInfo]/aiProviderKey/allOf[#/components/schemas/ResourceMetadata]/updatedAt` to the response with the `200` status
  - …2 more
- **2026-06-07** `efdacf70acce` — 2 info
  - added `#/components/schemas/ResourceMetadata` to the `items/items/info/allOf[#/components/schemas/ModelInfo]/aiProviderKey` response property `allOf` list for the response status `200`
  - removed `#/components/schemas/BareMetadata` from the `items/items/info/allOf[#/components/schemas/ModelInfo]/aiProviderKey` response property `allOf` list for the response status `200`
- **2026-06-07** `2bd8fb53e649` — 1 info
  - added the optional property `items/items/info/allOf[#/components/schemas/ModelInfo]/agentVariationCount` to the response with the `200` status
- **2026-06-07** `873a704256d9` — 3 info
  - added the new optional `query` request parameter `aiProviderKeyId`
  - added the new optional `query` request parameter `includeInfo`
  - added the optional property `items/items/info` to the response with the `200` status

[Change history](https://skmtc.dev/cadenya/apis/cadenya-api/changes/v1/workspaces/:workspaceId/models/get.md)

---

[API](https://skmtc.dev/cadenya/apis/cadenya-api.md) · [All operations](https://skmtc.dev/cadenya/apis/cadenya-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cadenya/apis/cadenya-api/revisions/d2d65c2665bd?raw)
