# Models

Models represent the coding agents (Claude, Codex, Cursor) installed on your connected Polyscope servers and the models each one can run. Use this endpoint to discover valid values for the `model` parameter when [creating workspaces](/docs/api/workspaces#create-workspace) or [sending messages](/docs/api/messages).

Availability is per server: an agent only appears if its CLI is installed on that server, so two servers can return different results.

## List Models

Returns one entry per connected server with its available agents and models.

```
GET /api/v1/models
```

**Query Parameters**

| Parameter | Type | Description |
|---|---|---|
| `server_id` | string | Only return models for a specific server |

**Example Request**

```bash
curl https://getpolyscope.com/api/v1/models \
  -H "Authorization: Bearer your-api-token"
```

**Response**

```json
{
    "data": [
        {
            "server_id": "srv-abc123",
            "agents": [
                {
                    "id": "claude",
                    "name": "Claude",
                    "models": ["claude-opus-5", "claude-sonnet-5"]
                },
                {
                    "id": "codex",
                    "name": "Codex",
                    "models": ["gpt-5.3-codex"]
                }
            ],
            "models": ["claude-opus-5", "claude-sonnet-5", "gpt-5.3-codex"],
            "model_capabilities": [
                {
                    "value": "claude-opus-5",
                    "displayName": "Opus 5",
                    "supportsFastMode": true
                }
            ]
        }
    ]
}
```

**Fields**

| Field | Type | Description |
|---|---|---|
| `server_id` | string | The server this entry belongs to |
| `agents` | array | Installed agents with `id`, `name`, and their selectable `models` |
| `models` | array | Flat list of all model identifiers across agents |
| `model_capabilities` | array | Extra metadata for models that support it (display name, effort levels, fast mode) |

Servers that are offline or don't respond are skipped — if none respond, `data` is an empty array.
