A step by step guide on installing Ollama and Testing It with Postman
Download the Windows installer for Ollama from the official website and run the setup
program. After installation, open Command Prompt or PowerShell and confirm it works by
typing ollama --version. Next, download a model such as llama3 by
running:
ollama pull llama3
This command downloads the model so it can run locally on your machine. Ollama automatically
starts a local API service on http://localhost:11434. Install Postman from the
Postman website and open the application. Create a new POST request to
http://localhost:11434/api/generate. Add the header
Content-Type: application/json. In the body, use JSON like this:
{
"model":"llama3",
"prompt":"Explain REST APIs",
"stream":false
}
Click Send. If the response includes generated text, Ollama and the API connection are working successfully.
On Ubuntu, install Ollama using the official installation script. Open a terminal and run:
curl -fsSL https://ollama.com/install.sh | sh
After installation, confirm it works using ollama --version. Download a model
using ollama pull llama3. This step may take several minutes depending on your
internet speed because the model files are large. Ollama automatically exposes a REST API
on port 11434. Install Postman on Ubuntu by downloading the Linux package or using Snap.
Create a POST request to the same endpoint
http://localhost:11434/api/generate with a JSON request body containing a
prompt. When Postman returns generated text from the model, the installation and API
communication are verified.