Skip to main content
GET
/
api
/
v1
/
ollama
/
pull-status
curl --request GET \
  --url 'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "status": {
    "status": "pulling",
    "progress": 45.7,
    "digest": "sha256:78e26419b446...",
    "total": 3826793677,
    "completed": 1748742390
  }
}

Query Parameters

modelName
string
required
Name of the model being pulled
baseUrl
string
Optional Ollama server URL (defaults to http://localhost:11434)

Response

success
boolean
Indicates if the status was retrieved successfully
status
object
Pull status information
curl --request GET \
  --url 'http://localhost:3000/api/v1/ollama/pull-status?modelName=llama2' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "status": {
    "status": "pulling",
    "progress": 45.7,
    "digest": "sha256:78e26419b446...",
    "total": 3826793677,
    "completed": 1748742390
  }
}

Notes

  • Poll this endpoint periodically to monitor download progress
  • The progress field is a percentage between 0 and 100
  • Status changes from pullingextractingcomplete
  • 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
}