Ollama Vision Models: How to Ask a Local Model About an Image
Note: Some future links on this site may be affiliate links. We never claim hands-on testing; guides are researched from the public sources listed in each article.
How we wrote this: A summary of Ollama's official Vision and CLI documentation (linked below), checked October 29, 2026. Model names in the examples are the ones Ollama's docs use; the list of vision models changes often, so check Ollama's model library for current options.
A vision model reads an image along with your text prompt. Ollama's Vision documentation describes it simply: vision models "accept images alongside text so the model can describe, classify, and answer questions about what it sees." Because Ollama runs on your own computer, the image doesn't have to leave your machine when you use a local model.
Typical uses:
- Describing a photo or screenshot in plain words
- Pulling the text out of a picture of a sign, label or receipt
- Asking a question about a chart or diagram
- Sorting images into categories ("is this a photo of a product or a person?")
Step 1: Use a model that supports images
Not every model can see. Only models built for vision accept the images field. Ollama's model library has a vision filter that lists them. The docs' examples use gemma4:
ollama pull gemma4
If you're new to Ollama, start with our beginner walkthrough and come back here.
Step 2: Ask about an image from the command line
The quickest test, from Ollama's Vision page, puts the image path right in the ollama run command:
ollama run gemma4 ./image.png what is in this image?
The CLI reference shows the same idea inside a quoted prompt, with the image path at the end of the question. Either way, Ollama reads the file from disk and sends it to the model with your text.
Step 3: Send an image through the API
If you're building something, use the chat endpoint. The docs spell out one detail that trips people up: the REST API expects base64-encoded image data, while the official Python and JavaScript libraries accept file paths, URLs or raw bytes.
The cURL example from the docs, shortened:
IMG=$(base64 < test.jpg | tr -d '\n')
curl -X POST http://localhost:11434/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "gemma4",
"messages": [{
"role": "user",
"content": "What is in this image?",
"images": ["'"$IMG"'"]
}],
"stream": false
}'
The images field is a list attached to a user message. Text goes in content as usual. Our guide to Ollama's local API covers the endpoints, streaming and the default port (11434).
In Python, with the official library, you can pass the path directly:
from ollama import chat
response = chat(
model='gemma4',
messages=[{
'role': 'user',
'content': 'What is in this image? Be concise.',
'images': ['/path/to/image.jpg'],
}],
)
print(response.message.content)
Getting answers you can use
- Ask a specific question. "List every price on this receipt" works better than "what is this?"
- Ask for a structure. If you want fields back, combine vision with structured outputs so the reply follows a JSON schema.
- Check anything that matters. A model can misread small text or invent details that aren't in the image. Treat the answer as a draft and verify numbers, names and totals yourself.
- Mind memory. If replies get cut off or slow down, check whether the model fits your memory and how much context it's using. Our guide to Ollama context length explains the trade-off, and
ollama psshows whether a loaded model is running on the GPU or CPU.
Privacy notes
Ollama's FAQ says that when you run locally, Ollama doesn't see your prompts or data. That's the main reason to use a local vision model for receipts, ID-like documents or client files. Two cautions:
- Ollama also offers cloud-hosted models. If you pick one of those, your prompt is processed by Ollama's service, per the same FAQ.
- If you open Ollama's port to your network, anyone who can reach it can send images and prompts. The local API guide explains how binding works.
Sources
- Ollama: Vision
- Ollama: CLI reference
- Ollama: FAQ (local privacy, cloud models,
ollama ps) - Ollama model library: vision models