content becomes an array: a text part for your words and an image_url part for the picture.
url is required; detail is an optional hint about how closely to look.
Three Ways to Supply It
- An
httpsURL. The gateway fetches it. No credentials, no private or loopback hosts. - A data URL.
data:image/png;base64,<bytes>. Nothing is fetched. - Raw base64 plus
media_type. The gateway builds the data URL.
file_id for images. Send the image each time.
Model Support
The model must advertisesupports_image_inputs; otherwise the request is rejected. The catalog changes, so select at runtime:
Multipart Limits
A chat request can also carry images as multipart form parts alongside a JSONrequest field. That path enforces:
Example
Related
Multimodal
Overview.
PDF and Document Input
Documents in chat.
How the API Works
The request lifecycle.

