Multimodal Vision Token Budget: How Images Consume Context Windows Multimodal models draw image tokens from the same context window as text, so a single high-resolution desktop screenshot can cost more tokens than an entire policy document, according to an explainx analysis of provider vision billing. The analysis cites Google's EmbeddingGemma 2 paper and Gemma vision documentation describing configurable vision token budgets of 70 to 1,120 soft tokens per image, and OpenAI's vision guide documenting 170 tokens per 512px tile on gpt-4o at detail: high plus a per-image base. The analysis recommends that agent builders send accessibility trees, DOM snapshots or cropped widget captures instead of full-screen PNGs each step, and retire old screenshots from context to avoid exhausting the window. Multimodal context is one wallet. Text instructions, tool JSON, chat history and every image tile draw from the same limit. Teams that budget text-only prompts get surprised when three screenshots crowd out the system prompt. Quick answers | Question | Direct answer | |---|---| | Shared budget? | Yes — vision units count toward the same window as text | | Main driver? | Tile count × tokens per tile detail / resolution | | Cheaper paths? | Cropping, fewer frames, low detail, DOM snapshots https://explainx.ai/blog/vercel-labs-agent-browser-rust-cli-snapshot-refs-accessibility-tree-github-trending-guide-2026 | | Planning tool? | Model cards and API vision pricing tables | | Related infra? | KV cache https://explainx.ai/blog/what-is-kv-cache-llm-inference-explained-guide-2026 and context pricing https://explainx.ai/blog/context-window-pricing-decoded-2026 | How vision encoders bill context Most frontier multimodal models do not feed raw pixels directly into the text transformer. A vision tower converts image patches into embeddings aligned to the language model's token space. APIs expose that cost as vision tokens or image tokens so developers can reason about limits. High-resolution pages with small fonts push encoders to more tiles . That is why a single desktop screenshot can exceed an entire policy document in token cost. Google's EmbeddingGemma 2 paper https://arxiv.org/html/2610.37364?ref=explainx and Gemma vision docs https://ai.google.dev/gemma/docs/capabilities/vision?ref=explainx describe configurable vision token budgets 70–1120 soft tokens per image ; generative APIs follow the same tradeoff under different names. A ribbon passing through a window with its far end fading, showing how text and vision inputs share one context window For narrative background on shared limits, our multimodal AI guide https://explainx.ai/blog/what-is-multimodal-ai-complete-guide-2026 warned that image tiles can consume thousands of tokens each while still sharing one window with text. Drag the lab sliders: notice how six tiles per image across three frames can dominate a 128K window before the assistant speaks. Provider patterns planning, not quotes Always read the current doc for the model you deploy. OpenAI's vision guide https://platform.openai.com/docs/guides/images-vision?ref=explainx documents patch- and tile-based billing for example, 170 tokens per 512px tile on gpt-4o at detail: high , plus a per-image base . Patterns as of late 2026: - Tile or patch budgets tied to max edge length. - Detail or quality flags that step tile count up or down. - Video billed per frame or sampled frames — agent loops that screen-record burn budget fast. - PDF page renders treated like images when you rasterize. When OpenVLHarness https://explainx.ai/blog/openvlharness-uclanlp-visual-agent-harness-multimodal-memory-guide-2026 agents zoom crops, each zoom is another vision charge. Design harnesses to keep references addressable without resending full frames every turn. Agent and computer-use implications Computer use https://explainx.ai/blog/claude-platform-computer-use-browser-skills-files-api-ga-august-2026 and Codex computer use https://explainx.ai/blog/openai-codex-computer-use-windows-mobile-control-2026 workflows tempt agents to attach full-screen PNGs each step. Costs explode: An outlined hand lowering a cream tile into a compartmented tray, suggesting cropped UI captures instead of full-screen vision tokens 1. Prefer structured state — accessibility tree, DOM, snapshot refs https://explainx.ai/blog/vercel-labs-agent-browser-rust-cli-snapshot-refs-accessibility-tree-github-trending-guide-2026 . 2. Crop aggressively to the widget under test. 3. Diff frames — send stills only when the UI changed materially. 4. Cap history — retire old screenshots from context; store them externally and reference IDs thin prompts, thick artifacts https://explainx.ai/blog/thin-prompts-thick-artifacts-thin-skills-thariq-july-2026 . OpenVLHarness https://explainx.ai/blog/openvlharness-uclanlp-visual-agent-harness-multimodal-memory-guide-2026 multimodal memory exists partly so agents do not re-embed identical crops. Budgeting worksheet Use this order when estimating a production prompt: 1. System + tools — static prefix tool schema design https://explainx.ai/blog/tool-definition-schema-design-context-engineering-2026 . 2. Retrieved text — RAG chunks https://explainx.ai/blog/rag-context-injection-pipeline-design-2026 with reranker cap reranker guide https://explainx.ai/blog/how-to-add-reranker-rag-pipeline-latency-models-guide-2026 . 3. Conversation text — compact or summarize Headroom-style compression https://explainx.ai/blog/headroom-ai-context-compression-agents-guide-2026 if needed . 4. Vision inputs — tiles × frames × tokens per tile. 5. Reserve for assistant output — never spend 100% on input. If step 4 leaves less than your minimum output reserve, drop frames before dropping safety instructions. Local and edge stacks On-device MLX https://explainx.ai/blog/mlx-apple-silicon-run-llms-complete-guide-2026 and Gemma vision updates https://explainx.ai/blog/gemma-4-updates-flash-attention-tool-calling-july-2026 still respect finite RAM. Vision tensors add activation memory beyond weight footprint. When you run EmbeddingGemma 2 locally https://explainx.ai/blog/embeddinggemma-2-open-multimodal-embeddings-on-device-guide-2026 , lowering vision token budget is a first-class knob. Evaluation and monitoring Track per session: - Vision tokens per user turn p50 / p95 - OCR failure rate when you downscale to save tokens - Tool-call success before vs after screenshot diet Regression here looks like "the model forgot the policy" when in fact the policy was truncated. Tile math without vendor secrets Exact formulas differ, but planning math looks like: vision tokens ≈ n images × tiles per image × tokens per tile Where tiles per image grows with max width, height after the API's resize policy. tokens per tile is model-specific — read the card. Example for capacity planning only tile counts are illustrative; see your provider's calculator : three UI screenshots at high detail with six 512px tiles each and 170 tokens per tile on a model like gpt-4o → 3 × 85 + 6 × 170 ≈ 3,285 vision tokens before any text, using OpenAI's published base-and-tile table https://platform.openai.com/docs/guides/images-vision?ref=explainx . Add a 6k-token tool schema and 20k tokens of chat history and a "128k" model is already tight. Always leave output headroom . If you target 2k tokens of assistant JSON, your input budget is not 128k — it is 128k minus 2k minus safety margin. Detail modes and cropping playbook | Mode | Use when | Risk | |---|---|---| | Low / standard detail | Scene description, coarse layout | Misses tiny text | | High detail | OCR, dense dashboards | Token spike | | Cropped panel | Form validation on one modal | Needs correct crop logic | | Vector / DOM export | Web apps with accessible markup | Cheapest for coding agents | Before you spend vision tokens, ask whether RAG text https://explainx.ai/blog/rag-context-injection-pipeline-design-2026 already contains the fact. Vision is for layout, color, charts and unreadable PDF scans. Video and multi-frame agents Screen recordings for computer use https://explainx.ai/blog/openai-codex-computer-use-windows-mobile-control-2026 multiply costs linearly with sampled frames. Prefer: - Keyframe sampling on UI change detection - Event stream click, type, navigation with a single confirm screenshot - Lightpanda-style headless browsers https://explainx.ai/blog/lightpanda-1-0-headless-browser-zig-ai-agents-9x-faster-16x-less-memory-guide-2026 that expose DOM cheaply For robotics and physical AI, camera streams differ — see OpenVLHarness https://explainx.ai/blog/openvlharness-uclanlp-visual-agent-harness-multimodal-memory-guide-2026 for artifact memory instead of resending full video tensors into chat context. Batching and serving angle Multimodal prefill is heavier than text-only. When you self-host with vLLM vs SGLang https://explainx.ai/blog/vllm-vs-sglang-inference-server-comparison-2026 , vision inputs affect scheduling and KV cache https://explainx.ai/blog/what-is-kv-cache-llm-inference-explained-guide-2026 residency. Batch requests with large images together cautiously — one huge screenshot can delay unrelated text chats unless you use separate queues. Pricing and product implications Context window pricing https://explainx.ai/blog/context-window-pricing-decoded-2026 often lists input tiers. Vision tokens usually bill as input tokens at the same per-million rate unless the vendor lists a vision surcharge. Product managers should model p95 screenshot counts per workflow, not demo happy paths. Customer-facing copilots that let users attach unlimited images need server-side caps and user-visible counters — otherwise support tickets look like model stupidity when context truncated the policy. Testing checklist 1. Fixture set of 10 real UI captures at native resolution. 2. Measure vision tokens reported by API per fixture at each detail level. 3. Run golden questions with text-only, low detail, high detail; compare accuracy delta. 4. Automate regression in CI when you change resize code in the client. Research and embedder angle EmbeddingGemma 2 https://explainx.ai/blog/embeddinggemma-2-open-multimodal-embeddings-on-device-guide-2026 exposes truncatable embedding dimensions and adjustable vision token budgets for retrieval, not generation — but the same intuition applies: multimodal stacks expose knobs because one-size-fits-all waste is enormous. For science PDFs, consider layout parsers PixelRAG https://explainx.ai/blog/pixelrag-visual-rag-web-screenshots-berkeley-guide-2026 that store visual tiles in a vector DB instead of stuffing every page into the chat window each turn. Fine-tuning and eval notes Vision-heavy fine-tunes SAM 3 workflows https://explainx.ai/blog/meta-sam-3-promptable-concept-segmentation-sam-3-1-hugging-face-guide-2026 use different data pipelines than chat screenshots. Do not extrapolate tile counts from segmentation crops to Copilot-style chat uploads. When you run RULER-style long-context evals https://explainx.ai/blog/ruler-benchmark-long-context-evaluation-guide-2026 , multimodal fixtures are still rare — supplement with your own screenshot suite. Hardware footprint Vision prefill increases activation memory. On laptop MLX https://explainx.ai/blog/mlx-apple-silicon-run-llms-complete-guide-2026 runs, watch wired memory when you attach multiple images — the OS may thrash before the API returns a polite context error. Common mistakes - Treating marketing context window numbers as usable space decoded pricing https://explainx.ai/blog/context-window-pricing-decoded-2026 . - Sending duplicate screenshots across subagents in parallel worktree parallelism https://explainx.ai/blog/worktrunk-git-worktree-cli-parallel-ai-agents-claude-code-2026 . - Using vision where text logs suffice API JSON errors, stack traces . Related reading Mapping APIs you may already use Several 2026 agent stacks expose vision indirectly: - Chat Completions with image url parts — count tiles per attachment. - Responses API — multimodal inputs may report usage breakdowns; log them per trace. - Gemini files API — uploads may persist; still bill when referenced in generation. - Claude PDF uploads — pages rasterize; prefer text extraction when the PDF is digital. When you compare OpenVLHarness presets https://explainx.ai/blog/openvlharness-uclanlp-visual-agent-harness-multimodal-memory-guide-2026 across Qwen-VL and GPT-family models, token reports differ even on the same PNG. Normalize metrics in your gateway rather than trusting one vendor's demo screenshot. For coding agents, combine this guide with DESIGN.md and UI capture practices https://explainx.ai/blog/design-md-templates-professional-ui-ai-agents so designers know which screens will be screenshotted during agent reviews. If you operate a gateway, expose vision tokens and text tokens separately in usage webhooks. Finance and reliability teams ask different questions from the same trace, and merged totals hide screenshot regressions after a client app update. On-call playbooks should list "context truncation" as a first hypothesis when multimodal features launch. The fix is often operational — fewer frames, smaller crops — not a model swap. Record before-and-after token counts in the incident doc so the next team does not repeat the same attachment pattern. That single habit prevents expensive model upgrades that only mask bad attachment hygiene. Builders shipping agent sandboxes https://explainx.ai/blog/agent-sandboxes-coding-agents-compared-e2b-modal-daytona-guide-2026 should meter screenshot volume per session the same way they meter shell minutes. Enterprise rollout Document per-role limits: support tier 2 may attach five images; automated agents may attach none without human approval. Pair limits with redaction policies https://explainx.ai/blog/what-does-redact-mean-redaction-types-ai-guide-2026 when screenshots contain PII. Train internal users that "the model ignored the policy" often means the policy text was truncated — not refusal. Show token usage in internal UIs when you roll out vision features. Article accurate as of November 9, 2026. Verify vision token tables on each provider's model card before capacity planning.