A vision model answers questions about an image: what is in it, what the text in it says, or what is wrong with a screenshot. LocalAI serves vision models through the same OpenAI-compatible chat completions endpoint as text models, with the image attached to the message.
Install a vision model
Install a vision-capable model from the gallery (Models → Explore, then Install) or the command line (local-ai models install <name>). Check the gallery entry says the model supports vision — a text-only model cannot describe an image, and the request will fail or ignore the picture.
Send the image and a question
Send a chat completion with the image included in the user message, using the OpenAI message shape with an image_url part:
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "your-vision-model", "messages": [{"role": "user", "content": [{"type": "text", "text": "Describe what is in this image."}, {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}]}]}'
Replace your-vision-model with the installed vision model’s name and the ... with the base64 image data. If you set an API key, add the Authorization: Bearer header. Start with a small, clear image: a cluttered photo or a tiny screenshot gives a vague description from any model.
| Check | What you should see | If you do not see it |
|---|---|---|
| Vision model installed | The gallery entry says the model supports vision | A text-only model was installed — it cannot see images |
| Reply describes the image | The reply mentions real details from the picture | The image data was malformed — check the base64 encoding |
| Small image first | A clear photo gets a specific description | A cluttered image gives a generic answer — crop it and retry |
Expected result. We checked the LocalAI text-and-retrieval docs for the OpenAI-compatible chat completions endpoint and the model-setup docs for gallery installation. We did not run LocalAI, so the image request above is UNTESTED on this machine — confirm the vision model’s exact name and the image format in the gallery entry first.
Limits
A vision model’s description is a guess from pixels: it can misread text, miss small details, and invent things that are not there. Never use it as the only check for a document, a sign, or a safety-critical image.
Sources
- LocalAI Text and retrieval — text generation through the OpenAI-compatible API; chat completions POST /v1/chat/completions
- LocalAI Setting Up Models — gallery install via Models → Explore; local-ai models install
Sources checked 2026-11-28.
