Image input
Image input passes through in each protocol's native format and works only with multimodal models; sending an image to a text-only model returns 400. Verified combinations: claude-opus-4-8 in the Anthropic format, gpt-5.6-sol in the OpenAI format, and gemini-3.5-flash in the Gemini format.
Using image URLs
In the OpenAI format, use an image_url content block with a public URL; this is reliable in our tests:
{"type": "image_url", "image_url": {"url": "https://example.com/photo.png"}}
The Anthropic format also has an image block with source.type set to url, but the upstream fetches the address itself: in our tests some public URLs could not be fetched and the model replied that it saw no image. Prefer the Base64 method below for the Anthropic format.
Using Base64 encoded images
Anthropic format:
{
"type": "image",
"source": {"type": "base64", "media_type": "image/png", "data": "<Base64>"}
}
OpenAI format:
{"type": "image_url", "image_url": {"url": "data:image/png;base64,<Base64>"}}
Gemini format, as inlineData inside parts:
{"inlineData": {"mimeType": "image/png", "data": "<Base64>"}}
Sending an image to a model that does not support images returns 400 invalid_request_error, and the message says the model does not accept image input; remove the image or switch to a multimodal model.