Multimodal

Send images and documents alongside text in your LLM requests

Gateway accepts multimodal content natively. Include image or document content blocks in your messages and Gateway routes to a capable model. No configuration needed. Gateway automatically detects which models support each modality and translates content to the provider’s format.

Supported content types

TypeContent blocksSource typesExample models
Imagesimage, image_urlbase64, URLGPT-5.5, Claude Sonnet 5, Gemini 3.6 Flash
Documentsdocumentbase64, URLClaude Sonnet 5, Gemini 3.6 Flash

Quick example

1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6 model="openai/gpt-5.1",
7 input=[
8 {
9 "type": "message",
10 "role": "user",
11 "content": [
12 {"type": "text", "text": "What's in this image?"},
13 {"type": "image_url", "url": "https://example.com/photo.jpg"},
14 ],
15 }
16 ],
17)
18
19print(response.output[0].content[0].text)

Model compatibility

Gateway auto-detects multimodal capabilities from vendor-specific model metadata, so support tracks the live catalog rather than a fixed list. Use GET /v1/models and inspect vendors.<vendor>.capabilities.input to see whether the route you plan to use supports image or document inputs, or filter by input type in the model catalog.

Context compression automatically protects multimodal messages. When trimming is needed, text-only messages are removed first, so your images and documents are preserved.

Next steps