curl -s http://localhost:11434/api/chat -d '{"model":"llama3.2","messages":[{"role":"user","content":"Hi"}]}'

Category: AI/ML Tooling

curl -s http://localhost:11434/api/chat -d '{"model":"llama3.2","messages":[{"role":"user","content":"Hi"}]}'

Send a chat request to Ollama's API

Sends a single chat message to the running Ollama server over HTTP, with the conversation passed as a messages array exactly like OpenAI's API shape. Add "stream":false to get the full reply in one JSON response instead of tokens as they are generated. This is how other programs talk to Ollama; `ollama run llama3.2` is the interactive shortcut.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.