---
title: "List available Ollama models"
method: POST
path: "/v1/private/ollama/models"
tags: ["Ollama"]
---

# 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.

## Request body

- OllamaInstanceBaseUrlRequest — Request with Ollama instance base URL for connection testing or model discovery.
  - `base_url` string, required — Base URL of the Ollama instance. May include /v1 suffix which will be automatically removed for connection testing. For inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.
  - `api_key` string — Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.

## Response `200`

Models retrieved successfully

- OllamaModel[]
  - `name` string, required — Model name
  - `size` integer — Model size in bytes
  - `digest` string — Model digest/hash
  - `modified_at` string, date-time — Model modification date

## Other responses

- `422` — Unprocessable Content - Invalid URL format
- `500` — Failed to fetch models
- `503` — Ollama provider is disabled

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
