Skip to main content
Use a vision-capable model to send image input on Chat Completions, Responses, or Messages. Check the model’s advertised input modalities first. Mix images with text in a user message and the model reasons over both. Output on these surfaces is still text only — for image output, see Image generation. Two image sources work everywhere:
  • 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.
Image tokens are counted by the provider and billed like any other tokens — check the model’s published input rates and actual usage in billing.

Chat Completions

Use OpenAI-style image_url content parts in a user message:
A data: URI works in the same url field:

Responses API

Use input_image parts. image_url may be a string or a { "url": "..." } object, paired with input_text:

Messages (Anthropic)

Use an 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.)
A base64 source carries 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.