Ollama · REST API

Generate text

Send a prompt to the generate endpoint. Setting stream to false returns one JSON response.

curl http://localhost:11434/api/generate -d '{"model": "llama3.2", "prompt": "Why is the sky blue?", "stream": false}'

Official Ollama documentation

More rest api commands

All rest api commands · Ollama cheatsheet

Was this page helpful?