On this page
An unresized 12-megapixel smartphone receipt bills 1,120 tokens on Gemini 3/4, up to 4,784 tokens on Claude 5.5, and 2,942 to 14,364 tokens on OpenAI GPT-5.6/6 depending on detail mode. Downscaling uploads server-side to 768–1,024 pixels on the long edge and adding two-stage low-detail triage cuts per-image token consumption by 42–73% on the same model—and over 85% with tiered routing—without sacrificing OCR accuracy.
Editorial disclosure: Compiled and published by TrolyPage, whose token-tier pricing is modeled alongside direct model APIs below. External vendor pricing and documentation were verified on 2026-12-01.
Why Raw Smartphone Photos Silently Multiply Multimodal API Bills
Text billing is straightforward because 1,000 English words map cleanly to roughly 1,300 tokens. Image billing breaks that intuition. When a customer snaps a bank-transfer slip on a modern phone (3024 × 4032 px) or captures a QHD desktop screenshot (2560 × 1440 px) and drops it into a support thread, the API token bill depends on three invisible rules: how the vendor slices images into tiles or patches, what native resolution cap the model enforces, and what the default detail parameter triggers.
On OpenAI's current flagship lineup (gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, and gpt-5.5), omitting detail defaults to "auto", which resolves to "original" rather than "high" per the OpenAI Images and Vision specification. An unmodified 3024 × 4032 photo requires 95 × 126 = 11,970 patches of 32 × 32 px; multiplied by the model's 1.2× patch factor, that single upload bills 14,364 input tokens before prompt text is counted. Passing "detail": "high" enforces a 2,500-patch ceiling (3,000 tokens maximum), trimming nearly 80% of wasted pixels.
Anthropic introduced a similar step-up in reverse. Models from Claude 4.7 onward—including Claude Haiku 5.5, Sonnet 5.5, and Opus 5.5—automatically enable a high-resolution tier capped at 2,576 px long edge and 4,784 visual tokens, up from 1,568 px and 1,568 tokens on Standard-tier models (Claude Sonnet 4.6, Haiku 4.5). Without pre-resizing, a 3024 × 4032 photo on Claude 5.5 consumes roughly three times the visual tokens of earlier Claude generations. Meanwhile, on Gemini 3 and Gemini 4, leaving media_resolution unspecified defaults to 1,120 tokens per image—four times the 280-token low bucket in Google's Media Resolution guide.
Oversized images also degrade time-to-first-token (TTFT) and network serialization. Resending base64-encoded camera photos across every turn of a 10-message troubleshooting conversation forces clients to re-upload megabytes of payload and risks hitting request byte limits. Server-side resizing plus Files API file_id references stabilize both prefill latency and per-turn token predictability.
Verified Pixel-to-Token Conversion Formulas Across OpenAI, Claude, Gemini, and DeepSeek
Every major provider bills image inputs at standard input token rates (or modal input tiers), yet their geometric formulas behave differently as dimensions scale. Mapping exact patch boundaries lets engineering teams target dimensions that preserve 10-point receipt digits without paying for half-empty edge tiles.
| Provider & Model Tier | Verified Tokenization Formula (2026-12-01) | Low / Triage Floor | Default / High Ceiling | Standard Input / Output Price (per 1M tokens) |
|---|---|---|---|---|
OpenAI Patch Models (gpt-6-astra, gpt-6.2-sol, gpt-6.1-terra, gpt-6-luna, gpt-5.6-*) |
ceil(ceil(w/32) × ceil(h/32) × 1.2) after fitting model detail pixel & patch budget |
detail: "low" fits 512 × 512 max (≤308 tokens; note gpt-5.4 low uses 6,144-patch cap) |
high: 2,500 patches (3,000 tok max); original/auto: up to 30,000 patches (36,000 tok) |
gpt-6.2-astra: $8.00 / $40.00; gpt-6.2-sol: $2.00 / $10.00; gpt-6.1-terra: $1.00 / $5.00; gpt-6-luna: $0.10 / $0.50 |
OpenAI Tile Models (gpt-4o, gpt-4.1, gpt-5.1) |
Fit 2048 × 2048, scale short side to 768 px, count 512 × 512 tiles: base + tile × count |
detail: "low" flat base: 85 tok (gpt-4o/4.1) or 70 tok (gpt-5.1) |
1080 × 1920 portrait = 6 tiles = 1,105 tok (gpt-4o); 4 tiles = 765 tok |
gpt-4o: $2.50 / $10.00; gpt-5.1: $1.25 / $10.00 |
Anthropic Claude (Haiku 5.5, Sonnet 5.5, Opus 5.5) |
ceil(width / 28) × ceil(height / 28) visual tokens (28×28 px patches) |
No built-in low flag; server-resize to 512 × 512 = 361 tokens | High-res (4.7+): 2,576 px / 4,784 tok max; Standard (pre-4.7): 1,568 px / 1,568 tok | Haiku 5.5 (≤100k): $0.10 / $0.50; Sonnet 5.5: $2.00 / $10.00; Opus 5.5: $4.00 / $20.00 |
Google Gemini 3 & 4 (gemini-3.8-flash, gemini-3.1-flash-lite, gemini-4-hydrogen, gemini-4-carbon) |
Fixed token buckets via per-content-item media_resolution (legacy 2.5 uses 768 × 768 tiles at 258 tok/tile) |
media_resolution: "low" = 280 tokens; "medium" = 560 tokens |
"high" or "unspecified" = 1,120 tok; "ultra_high" = 2,240 tok |
3.1 Flash-Lite: $0.25 / $1.50; 3.8 Flash: $0.75 / $3.75; 4 Hydrogen: $1.50 / $7.50; 4 Carbon: $4.00 / $20.00 |
DeepSeek API (deepseek-flash Vision & OCR API) |
deepseek-flash (DeepSeek-V4.1-Flash-1017) supports Vision; deepseek-v4-pro is text-only; separate File Parsing & OCR API billed per page |
Context caching cuts repeated prompt prefixes by ~98% ($0.003/M off-peak hit) | 1M context window; off-peak rates (outside 01:00–04:00 & 06:00–10:00 UTC Mon–Fri) halve peak fees | deepseek-flash: $0.15 / $0.60 (off-peak miss) or $0.30 / $1.20 (peak); OCR API: $0.225 / 1k pages |
Two pricing shifts effective December 1, 2026 alter production budgets on the Gemini Developer API pricing page: deprecated gemini-2.5-flash requests now auto-route to gemini-3.5-flash-lite ($0.30 input / $2.50 output per 1M tokens), while gemini-4-carbon moved from its November rate ($2.00/$10.00) to $4.00 input / $20.00 output per 1M tokens. Meanwhile, gemini-3.8-flash remains at $0.75/$3.75 through December 31, 2026 before doubling on January 1, 2027.
On Anthropic's side, Claude Platform pricing keeps image tokens at standard input rates: Claude Haiku 5.5 runs $0.10 input / $0.50 output per 1M tokens (for prompts ≤100k tokens), Claude Sonnet 5.5 runs $2.00/$10.00, and Claude Opus 5.5 runs $4.00/$20.00. Both OpenAI and Anthropic offer 50% Batch API discounts for async queues, while DeepSeek API pricing halves rates during off-peak UTC windows.

Why This Instead of That: Raw Flagship vs. Server-Side Downscaling vs. Two-Stage Triage
When teams wire vision into customer support or back-office verification, three architectures compete for budget. Picking the wrong pattern either wastes 60–90% of spend on blank background pixels or fails OCR on dense transaction IDs.
| Decision Dimension | Option A: Raw Camera Uploads + Unconditional Flagship High Detail | Option B: Server-Side Downscaling (768–1,024 px) + Fast Multimodal Models | Option C: Two-Stage Triage (Low-Detail Filter → Targeted High-Detail Pass) |
|---|---|---|---|
| Optimal Monthly Volume | Under 500 complex images/mo (ad-hoc legal, medical diagram, or CAD inspection) | 1,000–25,000 images/mo where ≥60% of uploads contain dense receipts, waybills, or UI text | 5,000–50,000+ images/mo with mixed traffic (65–75% coarse product/defect checks, 25–35% dense OCR) |
| Monthly Budget Envelope (1k–50k/mo) | $28.78/mo (1k) to $1,636.80/mo (50k) on gpt-6.2-astra high; higher if auto triggers original |
$1.28–$2.07/mo (1k) to $64.12–$103.60/mo (50k) on Gemini 3.8 Flash or gpt-6.1-terra |
$0.86–$1.64/mo (1k) to $42.79–$81.81/mo (50k) pairing Lite/Haiku triage with mid-tier escalation |
| TTFT & Payload Latency | Slowest: 3–8 MB base64 uploads inflate upload serialization plus 2,500–14,364 patch prefill | Fast single-hop: 120–250 KB resized JPEGs/WebPs cut prefill patches by 60–93% | Fast for 70% resolved in Stage 1; adds +1 sequential round-trip (~0.6–1.4s) for the 30% escalated |
| Visual Tokens per Image | 2,448–14,364 (OpenAI); 2,691–4,784 (Claude 5.5); 1,120–2,240 (Gemini) | 519–922 (OpenAI 768×1024); 588–1,036 (Claude); 560 (Gemini medium) |
Stage 1: 173–361 tokens (100% traffic); Stage 2: 922–1,120 tokens (only 25–35% escalated) |
| Root Technical / Economic Mechanism | Pays flagship input rates ($4–$10/M) for redundant sensor noise, margins, and wallpaper | Matches spatial Nyquist limit of 10–12 pt receipt fonts (~1,024 px long edge) to fast multimodal tiers | Decouples coarse intent classification (blurry check, category, defect presence) from dense OCR extraction |
| Cost of Choosing Wrong | 10×–20× budget burn; hitting payload or TPM rate-limit walls during flash sales | Paying mid-tier OCR rates on simple "wrong color" photos when $0.10/M classifiers suffice | Wasting a double API hop if >65% of queue escalates anyway, or dropping blurry slips without a fallback flag |
The inflection point between Option B and Option C is straightforward. If your queue is a dedicated invoice or payment-slip verifier where most attachments hold tiny 8-digit reference codes, Stage 1 adds latency without skipping Stage 2—use Option B at 768 × 1024 px on gpt-6.1-terra, Gemini 3.8 Flash, or Claude Sonnet 5.5. Conversely, if customers send packaging photos, damaged-item snapshots, and casual questions alongside receipts, Option C resolves 65–75% of attachments on a $0.10–$0.25/M classifier and reserves high-detail budgets strictly for dense text.
Five-Workload Image Cost Matrix (1,000 to 50,000 Images per Month)
To isolate pure geometric savings (keeping the exact same model) alongside architectural tier routing, the table below models monthly spend across five workloads. Each full vision exchange includes 400 text input tokens and 150 output tokens; Stage 1 triage includes 400 text input tokens and 60 output classification tokens, escalating 25%–35% of volume to Stage 2.
| Monthly Workload & Dimensions | Same-Model Raw (Sonnet 5.5 / gpt-6.2-sol) |
Same-Model Resized (768–1024 px, % Saved) | Same-Model 2-Stage (Triage + Resize, % Saved) | Option A: Raw Flagship (gpt-6.2-astra High) |
Option B: Fast Resized (Gemini 3.8 Flash Med) |
Option C: Cross-Tier Triage (Haiku→Sonnet / Luna→Sol) |
|---|---|---|---|---|---|---|
| 1,000 images/mo Boutique D2C Receipts (1080×1920 → 768×1024, 35% esc.) | $7.68 / $7.20 | $4.37 (-43.1%) / $4.14 (-42.4%) | $3.65 (-52.5%) / $3.20 (-55.6%) | $28.78 | $1.28 | $1.64 / $1.54 |
| 5,000 images/mo Apparel Defect Photos (3024×4032 → 768×1024, 25% esc.) | $59.34 / $40.92 | $21.86 (-63.2%) / $20.72 (-49.4%) | $16.07 (-72.9%) / $14.49 (-64.6%) | $163.68 | $6.41 | $6.00 / $5.65 |
| 10,000 images/mo 3PL Waybills & Slips (2000×1500 → 1024×768, 30% esc.) | $100.76 / $81.84 | $43.72 (-56.6%) / $41.44 (-49.4%) | $34.34 (-65.9%) / $31.05 (-62.1%) | $327.36 | $12.82 | $14.18 / $13.36 |
| 25,000 images/mo SaaS UI Screenshots (2560×1440 → 1024×576, 30% esc.) | $296.70 / $195.75 | $96.35 (-67.5%) / $92.10 (-53.0%) | $81.95 (-72.4%) / $71.28 (-63.6%) | $783.00 | $32.06 | $31.56 / $29.81 |
| 50,000 images/mo Marketplace Receipts (3024×4032 → 768×1024, 35% esc.) | $593.40 / $409.20 | $218.60 (-63.2%) / $207.20 (-49.4%) | $182.61 (-69.2%) / $165.62 (-59.5%) | $1,636.80 | $64.12 | $81.81 / $77.17 |
Notice the same-model columns: even when evaluation constraints lock your stack onto Claude Sonnet 5.5 or gpt-6.2-sol, server-side downscaling cuts monthly spend by 42.4% to 67.5%, and same-model two-stage detail routing pushes savings to 52.5% to 72.9%. Adding cross-tier routing (Haiku 5.5 → Sonnet 5.5, gpt-6-luna → gpt-6.2-sol, or Gemini 3.1 Flash-Lite → Gemini 3.8 Flash) reduces monthly bills by 78% to 89% versus raw mid-tier calls and over 95% versus raw flagship inference.

PDF Embedded-Text vs. Attached-Image Vision Boundary (and TrolyPage Quota Mapping)
Support teams often conflate PDF uploads with attached images, creating blind spots or unexpected token burn. Direct model APIs bill PDFs by combining text extraction with page rendering: Anthropic's PDF support guide notes roughly 1,500–3,000 extracted text tokens per page plus up to 1,568 visual tokens per rendered page image, while Gemini 3 and 4 allocate 560 image tokens per page at the recommended medium setting alongside native PDF text. When pipelines only need plain text from multi-page invoices, DeepSeek's standalone File Parsing & OCR API extracts text at $0.225 per 1,000 pages before LLM inference.
Inside managed customer-inbox workspaces rather than custom API plumbing, that boundary separates knowledge ingestion from live chat vision. On TrolyPage, the knowledge-base PDF parser reads embedded text layers only and includes no OCR pipeline for scanned image-only PDFs—meaning scanned PDF catalogs must be OCR-converted before indexing, while vision-capable chat agents interpret attached customer images (receipts, defect photos, UI screenshots) directly inside the conversation.
TrolyPage publishes transparent monthly token quotas in USD (VAT included) on its pricing page and payment policy page: Lite (4,000,000 tokens/mo at $8/mo), Starter (16,000,000 tokens/mo at $16/mo), Pro (40,000,000 tokens/mo at $32/mo), and Scale (200,000,000 tokens/mo at $104/mo), plus optional add-on packs (500,000 tokens for $4, 2,000,000 for $12, and 5,000,000 for $24). Its Free plan (50,000 tokens) is a one-time, time-limited trial rather than a permanent free tier. While TrolyPage uses ~4,000 tokens per exchange as a baseline planning estimate, actual consumption depends on prompt length, knowledge retrieval, model choice, and attached image size—an unresized 3,000–4,784-token smartphone upload doubles single-turn token draw compared to a 922–1,036-token resized attachment.
Implementation Asset: Server-Side Resize, Detail Routing, and Pre-Send Checklist
Apply these six pre-send controls before deploying any multimodal support or receipt-verification pipeline:
- Auto-orient and strip EXIF metadata first: Apply EXIF rotation before resizing, then drop metadata so sideways receipts do not force extra patches or OCR errors.
- Cap longest edge at 1,024 px for OCR and 512 px for triage: Target 768 × 1024 for portrait receipts or 1024 × 576 for 16:9 UI screenshots. On Claude 4.7+/5.5, snapping dimensions to multiples of 28 (such as 784 × 1008 = 1,008 tokens) eliminates partial-patch waste.
- Match compression format to text density: Export camera photos and paper receipts as JPEG quality 85 (avoid dropping below 75, which blurs decimals). Keep crisp 1 px UI screenshots as lossless PNG or WebP.
- Set detail and resolution flags explicitly: Pass
"detail": "high"(or"low") on OpenAI calls sogpt-6-astraandgpt-5.6-*never fall back to"original". Pass explicitmedia_resolutionper item on Gemini 3/4. - Enforce structured triage escalation rules: Have Stage 1 return strict JSON (
{"category": "receipt|defect|ui_error|other", "readable": true, "escalate": false}) and escalate whenevercategoryisreceiptorui_error, orreadableisfalse. - Reference
file_idin multi-turn threads: Upload once via the vendor Files API rather than resending base64 payloads across follow-up turns.
import math
from PIL import Image, ImageOps
def prepare_vision_asset(src_path: str, out_path: str, mode: str = "ocr") -> tuple[int, int]:
"""Downscale smartphone uploads deterministically before API submission."""
max_edge = 512 if mode == "triage" else 1024
patch_align = 28 # Aligns to Claude 28px patches and stays within 32px OpenAI budgets
with Image.open(src_path) as im:
im = ImageOps.exif_transpose(im).convert("RGB")
w, h = im.size
if max(w, h) > max_edge:
scale = max_edge / max(w, h)
w = max(patch_align, (math.floor(w * scale) // patch_align) * patch_align)
h = max(patch_align, (math.floor(h * scale) // patch_align) * patch_align)
im = im.resize((w, h), Image.Resampling.LANCZOS)
im.save(out_path, format="JPEG", quality=85, optimize=True)
return im.size
Before locking monthly budgets, benchmark a 100-image golden set of real customer receipts, product photos, and UI screenshots across Option B and Option C while logging exact usage.input_tokens fields from each API response. Measuring actual visual tokens per workload turns unpredictable multimodal bills into a controlled unit cost.
Comments
Your comment will appear after review.
Sign in to commentNo comments to show.