# Sending Code as Images Cut Token Cost About 60% > Author: Tony Lee > Published: 2026-07-03 > URL: https://tonylee.im/en/blog/code-as-image-cuts-token-cost-60-percent/ > Reading time: 2 minutes > Language: en > Tags: anthropic, tokens, fable-5, ocr, cost, pxpipe ## Canonical https://tonylee.im/en/blog/code-as-image-cuts-token-cost-60-percent/ ## Rollout Alternates en: https://tonylee.im/en/blog/code-as-image-cuts-token-cost-60-percent/ ko: https://tonylee.im/ko/blog/code-as-image-cuts-token-cost-60-percent/ ja: https://tonylee.im/ja/blog/code-as-image-cuts-token-cost-60-percent/ zh-CN: https://tonylee.im/zh-CN/blog/code-as-image-cuts-token-cost-60-percent/ zh-TW: https://tonylee.im/zh-TW/blog/code-as-image-cuts-token-cost-60-percent/ ## Description Dense pixel fonts pack ~40k characters into one Anthropic image bill. pxpipe production logs show ~59% savings, with caveats: Fable 5 only, and keep IDs as text. ## Summary Sending Code as Images Cut Token Cost About 60% is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - Image tokens can be cheaper than text tokens - Production logs: about 59% lower cost - Still Fable 5 only ## Content While people were pushing hard to use Fable before a cutoff window, someone tried a joke: send a screenshot of code instead of the code. Token usage dropped by more than half. Three things explain it. ## Image tokens can be cheaper than text tokens Anthropic bills a 1568px image as a fixed cost regardless of how many characters sit inside. Render dense pixel fonts and one image can hold on the order of 40,000 characters. As text that might be about 10,000 tokens; as an image it can land near 3,279. That is optical compression in the same spirit as DeepSeek-OCR demos, applied to billable context. ([analysis](https://lnkd.in/gP4zATPZ), [background](https://lnkd.in/gFeYiSer)) ## Production logs: about 59% lower cost [pxpipe](https://lnkd.in/gnRhbNS3) reported production numbers over 13,709 requests. A bill that would have been about $100 landed near $41. On compressed requests alone the saving reached about 72%. Quality did not collapse in their SWE-bench Lite sample of 10 tasks: full marks before and after the setting. ## Still Fable 5 only On 100 random-number tasks that cannot be memorized, Fable 5 scored 100 on both text and image renders. Opus dropped to 93 on images. On 12-digit hex recovery from images, Fable 5 hit 13/15 and Opus 0/15. That is why the approach is blocked on Opus in their tooling. When extraction fails, models often invent a plausible wrong answer instead of erroring cleanly. Keep IDs, hashes, and other brittle strings as text. Cost control used to mean prompt compression. Pixel compression is now another lever. `npx pxpipe-proxy` is enough to try the path today. Treat it as a measured experiment on Fable-class models, not a universal default for every stack. ## Related URLs - Author: https://tonylee.im/en/author/ - Publication: https://tonylee.im/en/blog/about/ - Related article: https://tonylee.im/en/blog/claude-code-cut-hidden-tool-tokens/ - Related article: https://tonylee.im/en/blog/fable-5-rate-limit-survival-settings/ - Related article: https://tonylee.im/en/blog/baidu-unlimited-ocr-multi-page-r-swa/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/en/blog/code-as-image-cuts-token-cost-60-percent/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/en/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.