Key Takeaway: Exact token formulas for OpenAI 512×512 tiling, Anthropic (W×H)/750 scaling, and Google Gemini native PDF page tokenization—and how downscaling cuts bills 60%.
1. OpenAI High-Detail vs Low-Detail Tiling
In GPT-4o Vision, setting `detail: "low"` caps any image at a flat 85 input tokens regardless of dimensions—ideal for coarse classification or slide sorting. Setting `detail: "high"` scales the image into 512×512 pixel tiles, charging 170 tokens per tile plus 85 base tokens. A typical 150-DPI letter page resized to 1024×1536 consumes 6 tiles (1,105 tokens), whereas accidentally uploading raw 300-DPI 2550×3300 scans triggers automatic rescaling and maximizes tile counts needlessly.
2. Anthropic Pixel-Area Tokenization
Claude 3.7 and 3.5 Sonnet calculate vision tokens as roughly `(width × height) / 750`, automatically resizing images larger than 1,568 pixels on the longest edge so a single image generally tops out near 1,600 input tokens. Resizing monochrome scanned documents cleanly to ~1,092×1,092 (or ~900×1,200) before encoding eliminates redundant bandwidth and cuts input token burn without hurting legibility.
3. Gemini Native PDF & Video Tokenization
Unlike tile-only APIs, Gemini 2.5 Pro and Flash accept raw PDF byte streams and tokenize each page at a compact ~258 tokens (plus extracted layout cues) inside a 1M-token window. For a 100-page SEC 10-K filing (~25,800 input tokens), Gemini 2.5 Flash charges less than $0.008 in input tokens—dramatically cheaper than rasterizing 100 pages into 1,105-token high-detail PNG tiles.
4. Practical Pre-Flight Image Optimization Checklist
Always benchmark extraction F1 across 100-DPI, 150-DPI, and 200-DPI renders on a 100-page golden validation set before scaling. Crop blank margins, convert color office forms to clean grayscale JPEG/WebP (quality 80–85), and route simple text-layer PDFs through local `pypdf`/`pdfplumber` extraction ($0/page) before invoking paid vision endpoints only on scanned or table-heavy pages.