Skip to main content

Vision Language Models

Sunset Notice: All vision language models on this page are being discontinued. These models will be removed in a future update. Please plan your migration accordingly.
Analyze images and documents using powerful vision-language models (VLMs). These multimodal models can understand image content, extract text, answer questions about visuals, and perform complex reasoning tasks—all through the same chat completions API.

Overview

Vision language models combine image understanding with natural language processing to enable:
  • Image Understanding: Describe and analyze image content
  • Document Analysis: Extract text from documents, receipts, and forms (OCR)
  • Visual Q&A: Answer questions about images
  • Image-based Reasoning: Perform complex analysis and comparisons

Endpoint

VLMs use the same chat completions endpoint as text models:

Basic Example

Image Input Format

Encoding Images

Images must be base64-encoded before sending to the API. Here’s a helper function:

Message Format

When sending images, the content field becomes an array of content objects:

Limitations

  • Supported formats: JPG, PNG
  • Maximum resolution: 2048x2048 pixels
  • Images per request: 1

Multi-turn Conversations

You can ask follow-up questions about an image by maintaining conversation history:

Available Models

Model Recommendations

Choosing the right model:
  • Best quality: Qwen2.5-VL-72B-Instruct for complex analysis and detailed understanding
  • Best value: Pixtral 12B at $0.10/M tokens for general image tasks
  • Document analysis: NVIDIA Nemotron Nano for OCR, forms, and document intelligence
  • Balanced: Qwen2.5-VL-7B-Instruct for good performance at moderate cost

Use Cases

Document Analysis

Extract text and structured data from documents, receipts, and forms:

Image Captioning

Generate detailed descriptions of images:

Visual Q&A

Ask specific questions about image content:

Next Steps

Text APIs

Text generation with large language models

Image APIs

Generate images from text prompts

Audio APIs

Text-to-speech and audio generation