curl -s http://localhost:11434/api/generate -d '{"model":"llama3.2","prompt":"Explain Docker in one sentence","stream":false}'
Generate text via Ollama's API
Asks the Ollama server to complete a raw prompt, without chat history, and returns JSON containing the response field. stream:false makes the server buffer the whole answer instead of streaming token chunks. The companion endpoint /api/chat handles conversational messages; both speak to the server started by `ollama serve`.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.