Anthropic prices a text token the same no matter what it contains. An image token is different, it is priced by the pixel dimensions of the image, not by how much text is packed inside it. A small open-source proxy called pxpipe exploits that gap directly: it rewrites the bulky parts of a Claude Code request, system prompts, tool documentation, long chat history, into a PNG before the request leaves your machine.
The Maths Behind It
On real Claude Code traffic, code and JSON-heavy context tokenizes at roughly 3.1 characters per token as plain text. Render that same content as a dense image instead and the cost is fixed by pixel count, not character count. A 1928x1928 PNG can hold around 92,000 characters at a vision cost of about 4,761 tokens. As plain text, that same content would cost close to 29,700 tokens. That is an 84% cut on that one chunk.
The project's own measured numbers land at a 59-70% reduction on the full bill across real traffic, lower than the single-chunk number because responses still stream as normal text and pxpipe only touches the request, never the output. Sparse, low-density prose loses money once you factor in the overhead of rendering an image, this only pays off on bulky, repetitive context.
Where It Breaks
Reading text back out of an image is OCR, and OCR is lossy. The project's own README calls the failure mode "silent confabulations, not errors." When the model misreads a character, it does not throw an error, it fills the gap with something plausible and wrong. Tested on 15 verbatim 12-character hex strings rendered as images, Claude Fable 5 read back 13 correctly. Opus read back zero.
That is why the tool only turns image compression on by default for Fable 5. For Opus, it stays opt-in, because Opus measurably struggles to read dense imaged text back with any reliability. Anything that has to survive byte-for-byte, hashes, API keys, exact code, has to stay as text. There is no error signal when it goes wrong. You just get a wrong value that looks right.
Where This Fits
Claude Fable 5 sits at the top of Anthropic's pricing, which is exactly why a trick like this gets attention there first. But it is a workaround, not a supported feature. The official levers for cutting a Claude bill are prompt caching, cached tokens read back at roughly a tenth of normal cost, tuning the effort parameter down for routine work, and batch processing at half price for anything that does not need a live response. None of those carry any risk of the model quietly inventing a character in your code.
If you are running high-volume Claude workloads and watching the bill, reach for caching first. The image trick is real and the numbers check out, but it belongs on large, disposable, non-critical context only, never on anything that has to be exact.