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

Body Parameters

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

Response

success
boolean
Indicates if the model was deleted successfully
message
string
Success or error message
curl --request DELETE \
  --url http://localhost:3000/api/v1/ollama/delete-model \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "modelName": "llama2"
  }'
{
  "success": true,
  "message": "Successfully deleted model: llama2"
}

Notes

This action is irreversible. Once deleted, you’ll need to pull the model again to use it.
  • Deleting a model frees up disk space
  • The model name must match exactly (including tag)
  • You can delete specific variants by including the tag (e.g., “llama2:7b”)
  • To delete all variants, you must delete each one individually