Programmatic control of the local fleet
You can do everything ollama the CLI does over HTTP. That matters when you're running Ollama on a remote machine, integrating it into a deploy pipeline, or building UI on top of it.
What each endpoint does
GET /api/tags— list installed models with size and modification time.POST /api/show— full metadata, template, parameters, capabilities for one model.POST /api/pull— download a model. Streams NDJSON progress events.DELETE /api/delete— remove a model.POST /api/embed— generate embeddings (single or batch).POST /api/copy— alias / rename a model (cheap, blobs are shared).GET /api/ps— currently loaded models with VRAM usage and TTL.GET /api/version— daemon version (use as health check).
Pull progress is streaming NDJSON
Most management endpoints are non-streaming, but /api/pull emits NDJSON progress lines: {"status": "pulling manifest"}, then {"status": "pulling abc123", "completed": 1234567, "total": 5000000000}, etc. Build a progress bar by reading completed / total per line.
Loading and unloading via API
There's no dedicated load/unload endpoint. The pattern is: send a /api/generate request with empty prompt and keep_alive set, which forces a load. Set keep_alive: 0 on the same endpoint to unload. This is how warmup scripts work.