Skip to main content
An image is a content part inside a chat message. 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.

Two Ways to Supply It

  1. A data URL. data:image/png;base64,<bytes>.
  2. Raw base64 plus media_type. The gateway builds the data URL.
There is no file_id for images. Send the image each time.

Model Support

The model must advertise supports_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 JSON request field. That path enforces:

Example

Raw base64 with a media type:
The response is an ordinary chat completion; the model’s reading comes back as text. Documents take a different part and path: PDF and Document Input.

Multimodal

Overview.

PDF and Document Input

Documents in chat.

How the API Works

The request lifecycle.