Image Tokens: Pixels Pay Tax Too
Text BPE “merges characters”; image encoding “cuts pixels.” You think you're sending the original—models bill the resolution after scale-and-align. Inside sits the same tier-jump trap as the text 32k red line.
Vision models cut images into fixed-size pixel blocks; each block maps to one Token. For Qwen VL, the core formula is:
| Variable | Meaning | Notes |
|---|---|---|
| h̄ / w̄ | Height & width after scaling | Forced to multiples of 32 (or 28) |
| token_pixels | Pixels per Token | Qwen3-VL is 32×32=1,024; QVQ / Qwen2.5-VL is 28×28=784 |
| +2 | Fixed overhead | Vision start/end markers <vision_bos> and <vision_eos> |
GPT-4o and Gemini use a tile mechanism: GPT-4o ~170 Tokens per 512×512 tile; Gemini 1.5 Pro ~258 Tokens per 768×768 tile. Analogy: text compression rate is set by vocabulary size; image compression rate is set by pixel-block size—32×32 saves more than 28×28.
Pick a common resolution, or drag width and height yourself. Watch the “twin trap” of 1000×1000 vs 1025×1025. Billing assumption: Qwen3-VL, token_pixels = 1,024, input 1 ¥/M (standard tier within 32k).
Is a 4K image better than 1080p? Not necessarily—and usually not worth it.
| Resolution | After scale (32-align) | Token count | Relative cost |
|---|---|---|---|
| 512 × 512 | 512 × 512 | 258 | 1x |
| 1080p (1920×1080) | 1920 × 1088 | 2,042 | 7.9x |
| 2K (2560×1440) | 2560 × 1440 | 3,602 | 14x |
| 4K (3840×2160) | 3840 × 2176 | 8,162 | 31.6x |
| 8K (7680×4320) | Hits scale cap | ~16,384 | 63.5x |
From 512 to 1080p, Tokens jump ~8× and recognition clearly improves; from 2K to 4K, Tokens roughly double again while accuracy gains may be invisible. You think you're paying for “sharper”—you're paying for “more pixel blocks”—and those extra blocks help the model less and less. Studies put VLM visual-Token redundancy as high as 85%.
| Task type | Token budget | Target resolution | Why |
|---|---|---|---|
| Coarse classification (cat vs dog) | < 300 | 512 × 512 | No detail needed |
| Scene understanding (what's happening) | < 1,000 | ~1000 × 1000 | Enough |
| OCR / chart analysis | < 4,000 | ~2000 × 2000 | Need to read text |
| High-precision detection (medical imaging) | < 16,384 | 4K+ | Enable vl_high_resolution_images as needed |
Three moves on the ground: front-end pre-compress (shrink to the target Token budget before upload; hold the resolution red line), task tiering (match the table—don't use 4K for classification), multi-image budget pool (when batch Tokens near 32k, truncate—same logic as last lesson's RAG budget cut).
| Red line | Threshold | Consequence | Response |
|---|---|---|---|
| 32-pixel alignment | Size crosses a multiple of 32 | Token count jumps | Front-end preprocess; align proactively |
| 32k input tier | Multi-image total > 32k Tokens | Whole request bills in the expensive band | Budget truncation like RAG |
| HD abuse | Blindly sending 4K+ originals | Cost ×30, limited accuracy gain | Match resolution to task tier |
Images bill the resolution after scale-and-align, not the original you upload. Formula: (h̄×w̄)/token_pixels + 2.
High-res returns diminish: 4K costs ~4× 1080p and may not understand better. Match resolution to task tier.
Multi-image needs a budget pool: near 32k, truncate or compress—don't let the 5th image drag the whole bill into the expensive band.
Source: Adapted from the author's internal team share “AI Token Cost Engineering Strategies,” section “Image Token Billing.” Official rules: Alibaba Cloud Model Studio vision docs; academic source for the “resolution curse”: CARES paper.