http(s)URL — must be reachable by the gateway or serving provider.data:URI — a base64 data URL (data:image/png;base64,...).
This applies to images in user messages. An image returned inside a tool
result must be a
data: URI — remote URLs there return 400. See
Images in tool results.Chat Completions
Use OpenAI-styleimage_url content parts in a user message:
data: URI works in the same url field:
Responses API
Show request format
Show request format
Use
input_image parts. image_url may be a string or a { "url": "..." }
object, paired with input_text:Messages (Anthropic)
Show request format
Show request format
Use an A base64 source carries
image content block with a source. The gateway accepts both Anthropic
source types — url and base64. (A bare claude-... model id routes to
Anthropic; any provider/model id also works here — see
SDKs & integrations.)media_type + data:Not every model is multimodal. Pick a vision-capable model (e.g.
openai/gpt-4o, anthropic/claude-sonnet-4-5, google/gemini-2.5-pro). A
model whose input_modalities explicitly exclude image rejects the request
with 400 invalid_request_error; for a model with no declared
modalities the request is forwarded and the provider’s own error surfaces as
502 upstream_error.
