Some Ollama models can see: give them an image and a question, and they answer about the picture. The API takes the image as a base64-encoded string in the images field of a /api/generate request, alongside the prompt.
Encode the image and send it with the prompt
Pull a multimodal model first — the API docs use llava as the example. Read the image file, base64-encode it, and send it in the images list with your question as the prompt: {"model": "llava", "prompt": "What is in this picture?", "images": ["<base64>"], "stream": false}. The reply’s response field holds the model’s description of the picture.
IMAGE=$(base64 -w0 photo.jpg)
curl http://localhost:11434/api/generate -d "{
\"model\": \"llava\",
\"prompt\": \"What is in this picture?\",
\"stream\": false,
\"images\": [\"$IMAGE\"]
}"
Large images make large requests: the base64 string is about a third bigger than the file, so shrink the image before encoding if the request is slow or fails. A text-only model given an images field will not suddenly see — the model itself must be multimodal, so check the model’s capabilities first.
Try it: four checks
| Check | What you should see | If you do not see it |
|---|---|---|
| Vision model pulled | ollama list shows llava or another vision model | Pull a multimodal model first |
| Image encoded | The base64 string is non-empty | Check the file path and the base64 command |
| Reply describes it | The response mentions what is in the picture | Ask a concrete question about the image |
| No text-only model | The model used is a vision model | A text model cannot use the images field |
Expected result. We checked the Ollama API reference, which says the images parameter takes a list of base64-encoded images for multimodal models such as llava. We did not call the API on this machine.
Limits
This guide covers the API image call only. Image size limits and which models are multimodal are separate checks. We did not test any vision call ourselves.
