An open-source tool called pxpipe allows users to reduce token costs for Claude Code and Fable 5 by hiding text within PNG images. The method leverages how Anthropic prices images, which use a fixed number of tokens based on pixel dimensions rather than character count. This allows dense content like code or JSON to be packed into fewer tokens, with about 3.1 characters per image token. The tool acts as a local proxy, intercepting requests to Claude Code and rendering static content such as system prompts and tool documentation as images, while recent messages and model outputs remain in text format. The model sees the compressed text as a single PNG page, replacing thousands of text tokens. In one Fable 5 demo, session costs dropped from $42.21 to $6.06, according to developer Steven Chong, with total savings averaging 59 to 70 percent.
The approach has tradeoffs, including potential accuracy issues and slower processing times. Since the model must run the rendered images through a vision encoder instead of reading text directly, exact strings like hashes can become garbled when read from images. By default, pxpipe supports Claude Fable 5 and GPT 5.6, with benchmarks and evaluations documented in the repository. Fable 5 achieves 100 percent accuracy in math problem benchmarks with fresh random numbers, while Opus 4.7 and 4.8 misread about 7 percent of the rendered images, and GPT 5.5 performs worse with image context. Both models are off by default and can only be enabled manually.
Source: thedecoder