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.

Three Ways to Supply It

  1. An https URL. The gateway fetches it. No credentials, no private or loopback hosts.
  2. A data URL. data:image/png;base64,<bytes>. Nothing is fetched.
  3. 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

Inline bytes instead of a URL:
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.