curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2' \
--header 'Authorization: Bearer <token>'
const response = await fetch(
'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2',
{
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/pull-status"
headers = {"Authorization": "Bearer <token>"}
params = {"modelName": "llama2"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"status": {
"status": "pulling",
"progress": 45.7,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 1748742390
}
}
{
"success": true,
"status": {
"status": "complete",
"progress": 100,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 3826793677
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Failed to get pull status"
}
Ollama
Get Pull Status
Retrieves the current download progress for a model being pulled
GET
/
api
/
v1
/
ollama
/
pull-status
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2' \
--header 'Authorization: Bearer <token>'
const response = await fetch(
'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2',
{
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/pull-status"
headers = {"Authorization": "Bearer <token>"}
params = {"modelName": "llama2"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"status": {
"status": "pulling",
"progress": 45.7,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 1748742390
}
}
{
"success": true,
"status": {
"status": "complete",
"progress": 100,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 3826793677
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Failed to get pull status"
}
Query Parameters
string
required
Name of the model being pulled
string
Optional Ollama server URL (defaults to http://localhost:11434)
Response
boolean
Indicates if the status was retrieved successfully
object
Pull status information
curl --request GET \
--url 'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2' \
--header 'Authorization: Bearer <token>'
const response = await fetch(
'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2',
{
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/ollama/pull-status"
headers = {"Authorization": "Bearer <token>"}
params = {"modelName": "llama2"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"status": {
"status": "pulling",
"progress": 45.7,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 1748742390
}
}
{
"success": true,
"status": {
"status": "complete",
"progress": 100,
"digest": "sha256:78e26419b446...",
"total": 3826793677,
"completed": 3826793677
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Failed to get pull status"
}
Notes
- Poll this endpoint periodically to monitor download progress
- The
progressfield is a percentage between 0 and 100 - Status changes from
pulling→extracting→complete - Once status is
complete, the model is ready to use
Polling Example
async function monitorPull(modelName) {
const interval = setInterval(async () => {
const response = await fetch(
`http://localhost:3000/api/v1/ollama/pull-status?modelName=${modelName}`,
{ headers: { 'Authorization': 'Bearer <token>' } }
);
const data = await response.json();
console.log(`Progress: ${data.status.progress}%`);
if (data.status.status === 'complete') {
clearInterval(interval);
console.log('Model pull completed!');
}
}, 2000); // Poll every 2 seconds
}
⌘I

