Skip to main content
A user message can carry images as content parts of type image_url. Models lists which models accept images.

Send an image

Add an image part to the content array, next to the text:
string
required
An absolute https:// URL, or a data URL such as data:image/png;base64,<data>. The media type in a data URL must match the image data.
string
auto, low or high. Optional.

Accepted images

  • A request over a limit fails with 413 request_too_large. An image in another format or from another source is rejected.
  • A data URL is part of the request body, so it counts toward the request body limit.
  • Each image also uses input tokens.

Images sent by URL

The API downloads the image. The URL must:
  • resolve to a public address;
  • contain no credentials;
  • use at most 3 redirects;
  • connect within 10 seconds and finish within 30 seconds;
  • return a 2xx status with a Content-Type of image/png, image/jpeg or image/webp. A generic type such as application/octet-stream is rejected;
  • return the image uncompressed, without Content-Encoding.
The image data itself must also be PNG, JPEG or WebP.
Last modified on October 3, 2026