Vision inputs
Vision-capable models accept images inside the content array. The gateway
passes image parts through in the surface's native shape.
Image by URL
{
"model": "gpt-5.1",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this diagram?"},
{"type": "image_url", "image_url": {"url": "https://example.com/arch.png"}}
]
}
]
}
Image by base64
Inline data URLs work when the image isn't publicly reachable:
{"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0…"}}
Keep payloads reasonable — requests over the gateway's body cap are rejected
with 400 before reaching any provider. For repeated use of the same asset,
host it and pass the URL.
Practical notes
- Filter the model catalog by the Vision capability tag.
- Images count toward input tokens at provider-specific rates; the usage block on the response reflects the true billed amount.
- The console Playground supports image attachments end-to-end — useful to sanity-check a model's vision behaviour before writing code.