Skip to main content
The gateway accepts image input on Chat Completions, the Responses API, and Messages. 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 — passed through; the provider fetches it.
  • data: URI — a base64 data URL (data:image/png;base64,...); the gateway splits it into the raw base64 + media type that providers accept directly.
Image tokens are counted by the provider and billed like any other tokens — no separate pricing (see Models & pricing).

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); sending an image to a text-only model surfaces the provider’s error as 502 upstream_error.