Keep-Alive and Memory Control
49%
Setting Keep-Alive per Request
The global setting is the default, but any individual request can override it. Pass keep_alive in the API call:
curl http://localhost:11434/api/chat -d '{
"model": "granite3.3:2b",
"messages": [{"role": "user", "content": "hi"}],
"keep_alive": "5m",
"stream": false
}'
Local AI Engineering with Ollama
Run, understand, customize, fine-tune, and build agentic apps on your own hardwareEnroll now to unlock all content and receive all future updates for free.
