# List available models

List model names and backend information available in the current workspace for agent calls and workflow model selection. This endpoint does not return provider credentials.

```text
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/llm/models
```

## Preparation before calling

Prepare a [personal access token](../../../../../guides/genesis/api-keys.md) with access to the target workspace and the [workspace ID](../../../../../guides/ai-studio/resource-center/workspace.md#copy-a-workspace-id).

## Request example

`$WORKSPACE_ID` identifies the target workspace; `$AI_STUDIO_API_KEY` is the credential.

```bash
curl "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/llm/models?type=chat" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | Target workspace ID; must match the workspace header. |

## Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | No | Model type. Use `chat` when selecting a workflow generation model. |
| `service_slot` | string | No | AI service slot ID. Filters models by that slot's configuration. |

This endpoint is not paginated. A model appearing in the list does not mean an inference request has succeeded.

## Successful response

Returns models visible to the caller. Use the model name in calls; backend IDs distinguish model sources.

```json
{
  "code": 0,
  "data": {
    "models": [
      {
        "model": "qwen3-coder-plus",
        "backend_id": -900001,
        "backend_name": "Genesis",
        "model_type": "chat"
      }
    ]
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | `0` on success. |
| `data` | object | Query result. |
| `data.models` | object[] | Available models. |
| `data.models[].model` | string | Model name to use in calls. |
| `data.models[].backend_id` | integer | Model backend ID. |
| `data.models[].backend_name` | string | Model backend name. |
| `data.models[].model_type` | string | Model type; returned when available. |

`[]` in a field path denotes each array item; after a type it denotes an array.

[Query model configuration list](list-model-configurations.md) returns saved agent model configurations and does not replace this endpoint. An empty configuration list does not mean the workspace has no callable models.

## Follow-up operations

Use a returned `data.models[].model` as `params.model` when [calling an agent](../agent-invocation/call-agent-from-agent.md). To generate a workflow, continue with [Build a workflow with natural language through the API](../../data-processing/workflows/build-with-api.md).
