Send images to a multimodal (vision) model through the Ollama API (/api/generate images or /api/chat message images)

domain: ollama.com · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Base64-encode each image file (raw base64 string, no data:image/...;base64, prefix).
  2. /api/generate: {"model": "llava", "prompt": "What is in this picture?", "images": ["<base64>"], "stream": false} — images is a top-level array parallel to the prompt.
  3. /api/chat: put the array on the message instead: messages: [{"role": "user", "content": "what is in this image?", "images": ["<base64>"]}].
  4. The reply comes back as normal text in response / message.content.
  5. Check the model supports vision first: POST /api/show and look for "vision" in capabilities (e.g. llava, bakllava).

Known gotchas

Related routes

Send images to vision models through the OpenRouter API (multimodal image inputs)
openrouter.ai · 6 steps · unrated
Run a multi-turn chat conversation against a local Ollama model with POST /api/chat
ollama.com · 5 steps · unrated
Send images to the OpenAI Responses API for vision analysis by URL, base64, or file_id, and generate images with the image_generation tool
platform.openai.com · 11 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans