---
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
- `isAssigned` boolean
- `labels` 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 — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. 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
      - `updatedAt` string, date-time — Timestamp when this resource was last updated
    - `spec` ModelSpec, required
      - `provider` string, required — The model provider (e.g., "anthropic", "openai", "google")
      - `family` string, required — 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)
      - `reasoning` 'REASONING_UNSPECIFIED' | 'REASONING_NONE' | 'REASONING_ADAPTIVE' | 'REASONING_BUDGET' | 'REASONING_NONE' | 'REASONING_ADAPTIVE' | 'REASONING_BUDGET', enum — The model's reasoning capability. Catalog data used to decide whether thinking is requested for objective iterations on this model.
    - `info` ModelInfo — ModelInfo carries server-derived, read-only details about a model.
      - `aiProviderKey` AIProviderKey — AIProviderKey is a credential for an AI provider, scoped to a workspace. Most keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by account administrators. The secret value is never returned in responses.
        - `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 — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. 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
          - `updatedAt` string, date-time — Timestamp when this resource was last updated
        - `spec` AIProviderKeySpec, required
          - `provider` 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE', enum — The AI provider this key authenticates against.
          - `credentials` union — AIProviderCredential is the secret material used to authenticate with a provider. The set case must correspond to AIProviderKeySpec.provider. The server encrypts the serialized message at rest and never returns it on reads.
            - AIProviderCredentialApiKey
              - …
            - AIProviderCredentialHeaders
              - …
          - `config` union — AIProviderConfig holds non-secret, provider-specific settings. The set case must correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic, Gemini) simply leave this unset. The endpoint of a named provider is fixed and intentionally not overridable here; use the OpenAI-compatible provider to target a custom endpoint.
            - AIProviderConfigOpenrouter
              - …
            - AIProviderConfigOpenai
              - …
            - AIProviderConfigOpenaiCompatible
              - …
        - `info` AIProviderKeyInfo — AIProviderKeyInfo carries server-derived, read-only details about a key, for AI provider management UIs.
          - `enabledModelCount` integer — Number of enabled models provisioned on this key.
          - `disabledModelCount` integer — Number of disabled models provisioned on this key.
          - `isPromotional` boolean — Cadenya includes promotional keys (one for onboarding, and potentially more in the future). These are not added or maintained by account administrators.
      - `agentVariationCount` integer — Number of agent variations currently provisioned on this model. Useful for previewing how many variations a swap would affect.
      - `lastUsedAt` string, date-time — Represents the last time this model was used in an agent objective
    - `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 — Page carries cursor-based pagination state. There is no total: the cursor walks the result set without ever counting it, and a count would cost a second query on every list.
    - `nextCursor` string

## Other responses

- `default` — Default error response

---

[API](https://skmtc.net/cadenya/apis/cadenya-api.md) · [All operations](https://skmtc.net/cadenya/apis/cadenya-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cadenya/cadenya-api/versions/ac1a7f084068/schema)
