Rendering text as PNGs to save on Claude Code tokens is clever and dumb at the same time

Rendering text as PNGs to save on Claude Code tokens is clever and dumb at the same time

There’s a new open-source proxy called pxpipe that renders Claude Code’s system prompt, tool docs, and older conversation history into PNG images before the request hits the API. People are reporting 60–70 % cuts on Fable 5 and Claude Code usage—just by sending dense non-executable text as a rasterized image instead of raw tokens.

The trick exploits a pricing anomaly in Anthropic’s token accounting. Image inputs cost less per byte of information than an equivalent wall of text, because the model sees a compressed visual representation and Anthropic bills by image tiles. Put differently: the tokenizer is the bottleneck, and packing text into pixels is a compression hack that games the unit cost. That’s not a new idea (I’ve seen people paste logs as screenshots for years), but pxpipe automates it into a proxy, which is what makes it operationally interesting.

The dumb part is betting that a model reading a compressed PNG won’t hallucinate on anything nuanced. A short instruction like “respond in JSON” is probably fine. A verbose API schema with nested types? I don’t trust it. The proxy doesn’t preserve text selectability or structure, and the model is reconstructing intent from a bitmap. If your agent chain relies on exact tool output specifications, you’re adding a new failure mode to save money on a per-request basis.

What I’m watching next: Anthropic will probably close this loophole—either by adjusting how image inputs are tokenized (treating text-heavy PNGs differently) or by nudging the pricing model. More interesting is whether it pushes people toward models with flatter cost structures, like Gemini’s long-context pricing, where you don’t need to play compression theater. The proxy exists because the pricing is wrong, not because PNGs are a great medium for system prompts.