Skip to main content
POST
/
api
/
v1
/
ollama
/
pull-model
curl --request POST \
  --url http://localhost:3000/api/v1/ollama/pull-model \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "modelName": "llama2"
  }'
{
  "success": true,
  "message": "Started pulling model: llama2"
}

Body Parameters

modelName
string
required
Name of the model to pull (e.g., “llama2”, “mistral:7b”)
baseUrl
string
Optional Ollama server URL (defaults to http://localhost:11434)

Response

success
boolean
Indicates if the pull was initiated successfully
message
string
Status message about the pull operation
curl --request POST \
  --url http://localhost:3000/api/v1/ollama/pull-model \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "modelName": "llama2"
  }'
{
  "success": true,
  "message": "Started pulling model: llama2"
}

Notes

Ensure Ollama is running before attempting to pull a model. Start it with ollama serve or by running the Ollama app.
  • Model pulls run asynchronously in the background
  • Use the Get Pull Status endpoint to monitor download progress
  • Large models can take significant time to download
  • Specify a tag (e.g., “llama2:7b”) to pull a specific variant, or use just the name to pull the latest version

Model Name Format

  • modelName: Just the name (pulls latest) - e.g., “llama2”
  • modelName:tag: Specific version - e.g., “llama2:7b”, “mistral:latest”