Reference · API
Ollama local API
Last updated
Run open-weight models on your machine; hit **localhost** from your app.
Run open-weight models on your machine; hit **localhost** from your app.
Base URL
http://localhost:11434Chat (non-streaming)
POST /api/chat{
"model": "llama3.2",
"messages": [{"role": "user", "content": "Summarize RAG in one paragraph."}],
"stream": false
}Response includes `message.content` with the assistant reply.
Generate (single prompt)
POST /api/generate{
"model": "llama3.2",
"prompt": "List three chunking tips for RAG.",
"stream": false
}Embeddings
POST /api/embeddings{
"model": "nomic-embed-text",
"prompt": "Annual refund policy"
}Pull a model
ollama pull llama3.2Tips
- Default port **11434** — firewall accordingly
- Smaller models trade quality for speed on laptop GPUs
- Check org policy before running on work hardware
Related
- How-to: Run local LLM with Ollama
- Lesson: Local LLMs
- Snippet: Ollama chat API