Course contentsShow
← AI Engineering
Lesson 1731 of 1,88642. Multimodal SystemsFree lesson

Cost and Latency Considerations

Understanding token costs for images, resolution trade-offs, and API pricing models.

Cost and Latency Considerations

What You'll Learn

You'll learn how vision-language models (VLMs) charge based on image resolution and tokens, and how to balance cost against speed and quality.

Why VLMs Are Different from Text-Only Models

When you send an image to GPT-4 Vision, Claude Vision, or Gemini, you're not just paying for your text prompt—you're paying for the image tokens too. Unlike text where 1 word ≈ 1-2 tokens, images consume hundreds or thousands of tokens depending on their resolution.

How Image Pricing Works

VLM APIs typically use one of these approaches:

Token-based pricing: Images are converted into visual tokens. A 512×512 image might cost 85 tokens, while a 2048×2048 image could consume 1,105 tokens. OpenAI's GPT-4 Vision uses this model—higher resolution = exponentially more tokens.

Per-image pricing: Some providers charge a flat rate per image regardless of size (within limits), making cost prediction simpler but potentially more expensive for small images.

Tiered resolution: Providers may downsample images to low/medium/high detail modes, each with different token costs. You explicitly choose the trade-off.

The Resolution-Cost-Quality Triangle

Think of it like streaming video: 4K gives better quality but costs more bandwidth. Similarly:

  • Low resolution: Cheap, fast, but may miss fine details (text, small objects)
  • High resolution: Expensive, slower, but captures intricate information
  • Auto-resize: Let the API downsample to a default (often cheapest but unpredictable)

Latency Factors

Beyond cost, processing time increases with image size. A 2048px image takes 2-4× longer to process than 512px. For real-time applications (chatbots, live OCR), this matters as much as price.

Key Takeaway: VLM costs scale with image resolution—profile your use case to find the minimum resolution that meets quality requirements, and monitor both token consumption and response time to optimize your budget and user experience.