v51

OpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-01308532588.1 KB
Ollama

List available 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.

post/v1/private/ollama/models

Request body

base_urlstring 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_keystring

Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.

Example request

{
  "base_url": "http://localhost:11434/v1"
}

Response

Models retrieved successfully

namestring required

Model name

sizeinteger

Model size in bytes

digeststring

Model digest/hash

modified_atstring date-time

Model modification date

Example response

[
  {
    "name": "llama2"
  }
]