Knowledge base

Send images to the API

Vision on ElephantPool: which models accept images, how to send one with the OpenAI SDK, the limits, and why image URLs are refused by design.

Models tagged vision in the catalogue accept images alongside text — the standard OpenAI multimodal format, so your SDK already knows how.

Which models

Check GET /v1/models or the models page for the vision capability. A model that cannot see refuses images with a clear 400 rather than silently ignoring your picture and answering about nothing — you should never pay for an answer to a question the model never saw.

Sending one

client.chat.completions.create(
    model="qwen3.8-27b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What is in this picture?"},
            {"type": "image_url",
             "image_url": {"url": f"data:image/png;base64,{b64}"}},
        ],
    }],
)

Inline the bytes — links are refused, and that protects you

Only data: URLs are accepted; an https link is rejected. The reason is the architecture: your request runs on a community machine, and following a link would make that machine fetch an arbitrary address on your behalf — and make your prompt's context dependent on whatever that server returned at that moment. Inlining keeps the job self-contained: what you sent is exactly what the model saw.

Limits and cost

See also: the model catalogue · download mahout · how the whole system works · the blog