Skip to main content
Use a current public model ID from Models or GET /models. Example IDs and options must match the selected model’s advertised capabilities and limits.
Vision-capable models accept images inside messages, in the standard OpenAI content-parts format.

Sending images

Turn a message’s content from a string into an array of parts, mixing text and image_url parts:
Multiple image parts per message are fine, and images can be combined with every other feature (streaming and reasoning).

Accepted formats

  • Data URIs: data:image/png;base64,... (also jpeg, webp, gif).
  • Public http(s) URLs: fetched at request time.

Which models support vision

Check capabilities.vision on GET /models, or the model cards on the models page. Sending an image to a non-vision model fails fast with 400 model_lacks_vision before anything is billed, and the error names the exact content part at fault.

How images are billed

Images are tokenized by the model and counted inside prompt_tokens: there is no separate image fee. The response’s usage object and nomask.cost_usd reflect the real total.

Image errors