Multimodal Vision & PDF Tokenization Cost Mechanics
Uploading a raw 4032x3024 smartphone photo or 300-DPI PDF scan doesn't bill by megabytes—it bills by image patch/tile grids. Downscaling to exact tile boundaries slashes vision spend.
Rate Card & Spec Audit:Published by:ShiftFrameLabsData Processing: 100% Local Client-Side Browser Math
How Are Images and PDF Pages Converted into Billable LLM Tokens?
Direct Answer Summary (Verified 2026-12-01)
Multimodal APIs bill by pixel dimensions rather than file kilobytes: OpenAI charges 85 base + 170 tokens per 512x512 tile, Google Gemini bills 258 tokens per 768x768 tile (or <=384px image), and Anthropic bills roughly (width * height) / 750. Pre-scaling a 2480x3508 scanned A4 page to 512x724 px cuts OpenAI tile billing from 1,105 tokens (6 tiles + base) down to 425 tokens (2 tiles + base, -61.5%) and Claude vision tokens from ~2,317 down to ~494 (-78.7%).
Image Resolution vs. Billed Vision Input Tokens Across Providers
Input Media Resolution
OpenAI (512px Grid)
Gemini (768px Grid)
Claude (~W×H / 750)
Raw 300-DPI A4 Scan (2480 × 3508 px)
1,105 tok (6 tiles + 85)
5,160 tok (4×5 tiles)
~2,317 tok (capped 1568px)
Medium A4 Scan (768 × 1086 px)
1,105 tok (2×3 tiles + 85)
516 tok (1×2 tiles)
~1,112 tok
Pre-Scaled Compact A4 (512 × 724 px)
425 tok (1×2 tiles + 85)
258 – 516 tok
~494 tok
Low-Detail / Thumbnail (≤384 × 384 px)
85 tok (detail: low)
258 tok (1 base tile)
~197 tok (avoid dense text)
// Optimal server-side pre-scaling rule for document OCR before multimodal API upload:
// 1. If PDF contains native selectable text layer + simple layout -> extract text (~350 tokens/page)
// 2. For Gemini 4 Vision -> scale to <=768x1086 px or set media_resolution: "low" | "medium" (258–516 tok/page)
// 3. For OpenAI / Claude -> rasterize crisp grayscale WebP at 512x724 px (~425–494 tok/page)
Frequently Asked Technical Questions
Does compressing a JPEG from 2 MB down to 150 KB reduce LLM vision token costs?
No! Vision tokenizers count pixel dimensions (width x height tiles), not file byte weight. File compression only speeds up HTTP upload time; resizing pixel dimensions is what lowers token charges.
When should native PDF upload be avoided in favor of text extraction?
Native PDF endpoints often rasterize every page as both text and vision tiles (~1,000–1,800 tokens/page). For text-only contracts without charts, local PDF-to-text extraction is 3x to 5x cheaper.
How expensive is direct video frame ingestion on multimodal APIs?
Sampling 1 frame per second at ~258 tokens/frame plus audio tokens consumes ~18,000 tokens per minute of video—over 1 million tokens per hour. Downsample static screen recordings to 0.2 fps or keyframes.
Privacy, Cookie & US State (CCPA/GDPR) Notice: We use essential local storage to remember your preferences. When advertising is active, third-party vendors including Google use cookies to serve ads based on prior visits. Calculator inputs never leave your browser. Read our Privacy Policy & Opt-Out Choices.