Running & Interacting with Ollama
Click any command to see what it does and simulate its terminal output.
Downloads Llama 3 (if needed) and opens an interactive chat session in your terminal.
Now that Ollama is installed, the real magic happens in your terminal (Command Prompt on Windows, Terminal on macOS/Linux). Ollama is controlled via a simple set of commands. To start chatting with an AI model, you use the run command. If you don't have the model yet, Ollama will automatically download it for you first. It's a seamless experience that brings high-end AI to your command line.
Interacting via API (For Developers)
One of the coolest features of Ollama is its built-in API. It runs a local server on port 11434. This means you can write a simple Python or JavaScript script to use the AI in your own projects. You can build your own personal assistant, a local document searcher, or even a Discord bot powered by your own computer!
The Core Commands
Try these in your terminal to manage your local AI library:
# Start a chat session with Llama 3
ollama run llama3
# See which models you have downloaded
ollama list
# Remove a model to save disk space
ollama rm llama3
# Pull a model without starting a chat
ollama pull mistralCURL API Example
You can send a JSON request to your local AI server using curl:
curl http://localhost:11434/api/generate -d '{
"model": "llama3",
"prompt": "Write a poem about space exploration.",
"stream": false
}'