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 } }
Retrieves the current download progress for a model being pulled
Show status properties
pulling
extracting
complete
error
progress
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 }