Open-source tool pxpipe hides text in PNGs to cut Claude Code and Fable 5 token costs up to 70%

Disclosure: Some links in this article are affiliate links. AI Maestro may earn a commission if you make a purchase, at no…

By AI Maestro July 4, 2026 2 min read
Open-source tool pxpipe hides text in PNGs to cut Claude Code and Fable 5 token costs up to 70%

A new open-source utility called pxpipe converts lengthy text inputs into compact PNG files to reduce token costs for Claude Code and Fable 5 by as much as 70 per cent.

The method relies on how Anthropic prices content. Text commands roughly one token per character. Images cost a fixed number of tokens based on pixel dimensions, regardless of the text inside. Rendering dense code or JSON as an image packs about 3.1 characters into every image token.

pxpipe acts as a local proxy. It intercepts requests to Claude Code and renders bulky, static sections as images. System prompts, tool documentation, and older chat history become pictures. Recent messages and model outputs pass through as normal text. The image below shows what the model actually sees: Around 48,000 characters of system prompt and tool documentation get squeezed onto a single densely packed PNG page. As text, that would cost about 25,000 tokens. As an image, it is roughly 2,700.

Developer Steven Chong states total savings average between 59 and 70 per cent. In one Fable 5 demo, session costs dropped from $42.21 to $6.06. If this somewhat exotic trick catches on, AI companies could respond by raising image processing prices.

The tradeoff is accuracy and speed

The approach has downsides. It is lossy and exact strings like hashes can come back garbled when read from images. Processing is also slower since the model has to run the rendered images through a vision encoder instead of reading text directly.

By default, pxpipe supports Claude Fable 5 and GPT 5.6. Benchmarks and evaluations are documented in the repository. Fable 5 hits 100 per cent accuracy in benchmarks on math problems with fresh random numbers the model cannot have memorised. According to Chong, Opus 4.7 and 4.8 misread about 7 per cent of the rendered images, and GPT 5.5 also does worse with image context. Both models are off by default and can only be enabled manually.

Feeding text to AI models as compressed images is not a new idea. Deepseek built an OCR system that processes text documents as images and, according to its technical paper, compresses them by up to a factor of ten while keeping 97 per cent of the information.

What it means

For developers running expensive models, the practical change is simple. You stop sending long context histories as text. Instead, you send them as images. The model reads the picture, but the bill is much lower. This works well for static data like system instructions. It fails for things that need exact string matching.

Scroll to Top