# List available Ollama models

**POST** `/v1/private/ollama/models`

Fetches the list of models available from the Ollama instance. URL may be provided with or without /v1 suffix (e.g., http://localhost:11434 or http://localhost:11434/v1). The /v1 suffix will be automatically removed for model discovery. For actual LLM inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.

Base URL: `https://www.comet.com/opik/api`

Tags: `Ollama`

## Authorization

This operation requires no authorization.

## Request body

Required. Media type: `application/json`

### Example request body

```json
{
  "api_key": "",
  "base_url": "http://localhost:11434/v1"
}
```

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | Models retrieved successfully | `application/json` |
| `422` | Unprocessable Content - Invalid URL format | `application/json` |
| `500` | Failed to fetch models | — |
| `503` | Ollama provider is disabled | `application/json` |

### Example response: 200 — Models retrieved successfully

```json
[
  {
    "digest": "string",
    "modified_at": "2026-06-09T00:00:00Z",
    "name": "llama2",
    "size": 0
  }
]
```

### Example response: 422 — Unprocessable Content - Invalid URL format

```json
{
  "code": 0,
  "details": "string",
  "message": "string"
}
```

### Example response: 503 — Ollama provider is disabled

```json
{
  "code": 0,
  "details": "string",
  "message": "string"
}
```

## Related pages

- [Activate a pairing session](./activatepairingsession.md)
- [Add blueprint to existing config](./updateagentconfig.md)
- [Add items to annotation queue](./additemstoannotationqueue.md)
- [Add span comment](./addspancomment.md)
- [Add span feedback score](./addspanfeedbackscore.md)
- [Add thread comment](./addthreadcomment.md)
- [Add trace comment](./addtracecomment.md)
- [Add trace feedback score](./addtracefeedbackscore.md)
- [Agent Configs](./tags/agent-configs.md)
- [Agent Insights](./tags/agent-insights.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
