curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models?baseUrl=http://192.168.1.100:11434' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/ollama/list-models', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/list-models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"models": [
{
"name": "llama2:latest",
"size": 3826793677,
"digest": "sha256:78e26419b4469263f75331927a00a0284ef6544c1975b826b15abdaef17bb962",
"modified_at": "2024-01-15T10:30:00Z"
},
{
"name": "mistral:latest",
"size": 4109865159,
"digest": "sha256:61e88e884507ba5e06c49b40e6226884b2a16e872382dca1224f4d8f5e5f2f53",
"modified_at": "2024-01-14T08:20:00Z"
}
]
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Ollama is not running",
"models": []
}
{
"success": false,
"error": "Failed to list models",
"models": []
}
Ollama
List Installed Models
Retrieves all models currently installed on the Ollama instance
GET
/
api
/
v1
/
ollama
/
list-models
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models?baseUrl=http://192.168.1.100:11434' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/ollama/list-models', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/list-models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"models": [
{
"name": "llama2:latest",
"size": 3826793677,
"digest": "sha256:78e26419b4469263f75331927a00a0284ef6544c1975b826b15abdaef17bb962",
"modified_at": "2024-01-15T10:30:00Z"
},
{
"name": "mistral:latest",
"size": 4109865159,
"digest": "sha256:61e88e884507ba5e06c49b40e6226884b2a16e872382dca1224f4d8f5e5f2f53",
"modified_at": "2024-01-14T08:20:00Z"
}
]
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Ollama is not running",
"models": []
}
{
"success": false,
"error": "Failed to list models",
"models": []
}
Query Parameters
string
Optional Ollama server URL (defaults to http://localhost:11434)
Response
boolean
Indicates if the request was successful
array
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/list-models?baseUrl=http://192.168.1.100:11434' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/ollama/list-models', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/list-models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"models": [
{
"name": "llama2:latest",
"size": 3826793677,
"digest": "sha256:78e26419b4469263f75331927a00a0284ef6544c1975b826b15abdaef17bb962",
"modified_at": "2024-01-15T10:30:00Z"
},
{
"name": "mistral:latest",
"size": 4109865159,
"digest": "sha256:61e88e884507ba5e06c49b40e6226884b2a16e872382dca1224f4d8f5e5f2f53",
"modified_at": "2024-01-14T08:20:00Z"
}
]
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Ollama is not running",
"models": []
}
{
"success": false,
"error": "Failed to list models",
"models": []
}
Notes
Ensure Ollama is running before calling this endpoint. The default Ollama server runs on http://localhost:11434
- Returns an empty array if no models are installed
- Model sizes are in bytes (convert to GB by dividing by 1,073,741,824)
- The digest can be used to verify model integrity
⌘I

