Skip to main content
Vision and Multimodal models can understand both text and images. They provide capabilities through a unified OpenAI-compatible Chat Completions API and are suitable for vision-language tasks such as image description, visual Q&A, and text-image workflows. Representative models include:
  • Qwen/Qwen2.5-VL-72B-Instruct
  • google/gemma-4-31B-it
For the full model list and pricing, refer to Models.

Core Capabilities

  • Image understanding: Describe images, extract text (OCR), and answer questions about visual content.
  • Visual Q&A: Ask follow-up questions about diagrams, screenshots, or product images.
  • Multimodal conversation: Mix text and images in a single conversation, such as “compare these two charts.”
  • Content moderation: Classify or flag image content using natural language instructions.

Image Message Format

When sending images, set content in messages to an array. Array items can be of type text or image_url. The image_url can be either a publicly accessible image URL or a data: URL, which is a base64-encoded image. Example structure:

Key Parameters

  • Parameters
    • temperature: Controls output randomness.
    • max_completion_tokens: Limits generation length and helps avoid truncated output.
    • stream=True: Returns responses as a stream. Recommended for long responses to reduce timeout risk.
  • Context The maximum context length supported by each model can be viewed in Models.
  • Image limits Supported image formats and size limits vary by model. For details, refer to Models.

Billing

  • Formula: Total cost = (input tokens x input unit price) + (output tokens x output unit price)
  • Pricing: The input unit price for vision models, measured by token, may differ from text-only models. Check the model detail page in Models for specific vision input pricing and whether any per-image caps or minimums apply.
  • Token calculation notes Total input tokens = text tokens + image tokens.
    • Images and other vision inputs are converted into input tokens for billing. The pixel-to-token mapping differs by model: higher resolution and more images usually produce more input tokens.
    • Text in the same request is still counted in the standard way.
    • If there are multiple images, each image is counted separately.
  • Token calculation examples The following representative models illustrate how visual content is converted into tokens:

Examples

The examples read the API key from an environment variable to avoid writing secrets into code.

Image Description

Visual Q&A with Base64 Images

Multiple Images in One Request

To send multiple images in a single request, add more image_url entries to the same content array. The model receives these images together and can use them for tasks such as comparison and summarization.