Capabilities

Vision

Vision-capable chat models can look at images as well as read text. Use them to describe photos, read diagrams and charts, pull text out of screenshots or scanned documents, or answer questions about a picture.

Send an image

Images travel as image_url content parts inside a normal chat message, exactly as in the OpenAI API. Mix as much text and as many images as the model allows in a single message.

from pendra import Pendra

client = Pendra()

response = client.chat.completions.create(
    model="qwen3-vl:8b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What's in this image?"},
            {"type": "image_url",
             "image_url": {"url": "data:image/png;base64,iVBORw0..."}},
        ],
    }],
)
print(response.choices[0].message.content)
The image sent to the model
The image you send
Response

A vivid impressionist oil painting of rolling hills at sunset, built up in thick palette-knife strokes of orange, yellow, and blue. A winding path leads through fields towards the hills, with a few small figures walking along it and autumn trees and a wooden fence in the foreground.

How images are accepted

  • Base64 data URIs (data:image/png;base64,…) work out of the box — the most common and most private option, since the image never leaves your request.
  • Remote http(s) URLs are opt-in on self-hosted workers (the worker would otherwise fetch arbitrary URLs from inside your network). When enabled, fetches are restricted to public hosts and are size- and time-bounded.

A model is vision-capable when it advertises the vision capability in the model list — installing a vision model from the catalogue sets this up for you. Sending an image to a model that can't see it returns a clear error rather than a blind guess.

Turning vision off to use every GPU

A vision model runs on a single GPU, so on a multi-GPU machine it has to fit within one card's memory. If a model is too large for one GPU but would fit across all of them combined, you can turn its vision off to run it as a text-only model spread across every GPU.

Open the worker on the Workers page, find the model in its list, and use the Vision switch next to it. With vision off, the model accepts text only and runs split across all the worker's GPUs; turn it back on at any time to accept images again. The model's advertised capabilities update to match, so the model list always reflects whether it currently accepts images.

Vision uses the chat endpoint. For the full message and content-part schema, see the Chat completions API reference.