The open-source proxy exploits Anthropic's flat-rate image pricing to pack thousands of characters of context into a single low-token PNG.
A new open-source tool called pxpipe converts large text inputs for Claude Code into compact PNG images, cutting session token costs by 59 to 70 percent on average, according to its developer [1].
The savings matter because many Claude Code sessions burn through tokens on static, repetitive content — system prompts, tool documentation, and older chat history — that gets re-sent with every request [1]. pxpipe targets exactly that overhead.
How the pricing gap works
The technique exploits a structural difference in how Anthropic charges for text versus images [1]. Text is billed at roughly one token per character, while images are billed at a fixed token count based on pixel dimensions, regardless of how much information they contain [1]. That means dense content rendered as an image yields about 3.1 characters per image token — far better than the one-to-one text rate [1].
In practice, pxpipe runs as a local proxy that intercepts outgoing Claude Code requests [1]. It renders the bulky, static portions of a request as a single densely packed PNG, while recent messages and model outputs continue to travel as plain text [1]. Developer Steven Chong demonstrated the effect with a Fable 5 session: costs dropped from $42.21 to $6.06 [1]. A concrete example from the repository shows roughly 48,000 characters of system prompt and tool documentation — about 25,000 tokens as text — compressed into a single image costing around 2,700 tokens [1].
Tradeoffs and model compatibility
The approach is not lossless [1]. Exact strings such as hashes can come back garbled when the model reads them from a rendered image, and processing is slower because the model must run each PNG through a vision encoder rather than reading text directly [1].
Model support varies [1]. By default, pxpipe works with Claude Fable 5 and GPT 5.6, both of which Chong says handle image context reliably [1]. Opus 4.7 and 4.8 misread about 7 percent of rendered images, and GPT 5.5 also performs worse with image context; both are disabled by default and require manual opt-in [1].
Feeding text to AI models as images is not a new concept — Deepseek built an optical character recognition (OCR) system that processes text documents as images and, according to its technical paper, compresses them by up to a factor of ten while retaining 97 percent of the information [1]. What pxpipe adds is a practical, drop-in proxy layer for everyday Claude Code use.
Chong noted that if the technique gains traction, AI companies could respond by raising image processing prices [1].
Sources
This article was drafted with AI from the cited sources and checked against them before publication. Spot an error? Let us know.



