Pixels for Programs? A Cross-Provider Case Study of Input-Token Accounting for Source Code as Text and Images
On the map: Multimodal LLMs / vision-language models → Visual token pruning and efficiency
Abstract (arXiv)
Long source-code contexts consume many text tokens, motivating the proposal to render code as images for vision-language models. Recent work asks whether models can still solve code tasks after this transformation. We examine a different systems question: how commercial APIs count the resulting requests. We present a reproducible measurement case study of provider-reported input tokens for raw source text and a compact rendered-image representation. The benchmark pairs requests across five programming languages, nine source lengths from 20 to 2,000 lines, and 15 available model aliases exposed by Anthropic, OpenAI, and Google Vertex AI. These aliases collapse to approximately five distinct accounting signatures and are not independent model replications. Across 675 complete text/image pairs, aggregate image-to-text ratios are 0.135, 0.194, and 0.242, corresponding to reported input-token reductions of 86.5%, 80.6%, and 75.8%, respectively. These totals conceal materially different break-even behavior: Anthropic and OpenAI images receive lower counts at every tested size, while Gemini images require 6.95 times as many tokens at 20 lines and cross below text only at 200 lines in the aggregate. A targeted audit also reproduces non-monotonic Gemini image accounting across a page boundary. This study measures black-box request accounting for one compact rendering pipeline. It does not measure semantic fidelity, task accuracy, latency, monetary cost, or coding-agent efficiency. We release the scripts, revision-pinned corpus specification, raw usage records, validators, and deterministic analysis needed to reproduce and extend the study.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Visual token pruning and efficiency, one of 16 directions in Multimodal LLMs / vision-language models. Builds on 4 of its 15 references that are in the map. First posted on arXiv 23 Jul 2026.
Builds on
4 of 15 references.
Closest ancestors · 1
Same direction, newest first
- 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compression31 Jan
Other references · 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understanding
- 2026Vision2Code: A Multi-Domain Benchmark for Evaluating Image-to-Code Generation
- 2026Beyond NL2Code: A Structured Survey of Multimodal Code Intelligence
- 2026Not All Redundant Tokens Are Alike: Analyzing Visual Token Pruning through Token Roles
- 2026Arena-T2I Hard: Benchmarking and Improving Faithfulness with Dependency-Aware Checklist
- 2025Thinking with Programming Vision: Towards a Unified View for Thinking with Images
- 2025ArtifactsBench: Bridging the Visual-Interactive Gap in LLM Code Generation Evaluation
- 2023An Empirical Investigation into the Use of Image Captioning for Automated Software Documentation