Free guide
pxpipe: Make Claude Code Read Its Bulky Context as Pictures
A free, open-source proxy that prints the bulky parts of Claude Code's context as small PNG pages, because Claude bills a picture by its size, not by how much text is on it. What it does, how to try it, and where it breaks.

The short version
- pxpipe (github.com/teamchong/pxpipe, MIT, over 7,700 stars) cuts the input tokens Claude Code sends by turning bulky context into compact pictures.
- It works because Anthropic bills an image by 28 by 28 pixel squares: a 1568 by 728 page is 56 x 26 = 1,456 tokens, whatever is written on it. In our offline test, a 53,957-character log became 3 pages, about a quarter of the tokens by pxpipe's own estimate.
- The catch is reading accuracy. pxpipe rates Opus 5.5 as gist only: fine for history and reasoning, not for exact IDs, and misses are silent. Its headline 59 to 70% bill cut was measured on the original Fable 5, not Opus 5.5.
How it actually works
Text is billed piece by piece, a picture by its size
Claude bills text by the token. An image is billed differently: Anthropic's docs say each 28 by 28 pixel block is one visual token, so an image costs width/28 x height/28 tokens no matter how much is written on it. Think of a billboard: you rent the space, not the words. pxpipe's README says dense code and JSON pack about 3.1 characters per image token, against about 1 character per text token on real Claude Code traffic (their measurement).
It sits between Claude Code and Anthropic
pxpipe is a local proxy on your machine (127.0.0.1:47821). Claude Code re-sends its system prompt, tool docs and history with every request. pxpipe rewrites the bulky parts into PNG pages before the request leaves your computer: the static system prompt and tool docs, older history, and large tool results. Recent turns and your newest messages stay text, and the model's replies are never touched.
Tiny print, plus a small text backup
The pages are 312 columns wide in a 5 by 8 pixel bitmap font (with a little extra row spacing for Opus). Because pixels aren't byte-exact, pxpipe also sends a short text factsheet of exact identifiers like paths, ids and numbers. In our test it kept a duration value but not a long request ID, which then only existed in the pixels.
It measures its own savings
For each request pxpipe asks Anthropic's free token counter what the original would have cost and compares it with what was billed, and logs both to ~/.pxpipe/events.jsonl. The dashboard shows tokens saved and every text to image conversion side by side.
How to set it up
1.Try it offline first (no Claude, no API key)
pxpipe can render any text to pages and print a cost estimate without running the proxy. This is the safest way to see what it does. Open the folder it prints to look at the pages.
cat big-log.txt | npx pxpipe-proxy export --stdin npx pxpipe-proxy export src/ npx pxpipe-proxy export --git2.Pick which models get pictures
By default pxpipe images claude-fable-5, claude-opus-5-5 and Gemini. Sonnet 5.5 and Haiku 5.5 are never imaged by default. If you don't want Opus 5.5 reading pictures, limit the list before you start.
export PXPIPE_MODELS=gemini,claude-fable-53.Run Claude Code behind it
warp starts the proxy and launches Claude Code pointed at it, using a local certificate that only that one process trusts. Start on a test project, not on code with secrets in it.
npx pxpipe-proxy warp -- claude4.Watch the dashboard
Open the local dashboard to see tokens saved, each conversion side by side, and a kill switch. For a summary later, use stats.
open http://127.0.0.1:47821/ npx pxpipe-proxy stats5.Give exact work a text path
If a task depends on exact strings (IDs, hashes, long numbers), make sure the agent can re-read them with its tools, or turn imaging off for that session.
export PXPIPE_MODELS=off
The fine print
- Free and open source under the MIT license, so it's fine to use at work. It doesn't cost anything itself; it only changes what you're billed for.
- Model matters. pxpipe's README puts Opus 5.5 in Tier 2, gist and agentic history only (3 of 15 on its exact dense-hex test), and lists Sonnet 5.5 and Haiku 5.5 as do not image. Its 59 to 70% end-to-end bill cut and the $6.06 vs $42.21 demo were on the original June 2026 Fable 5. For Opus 5.5 it claims about 50% or more live savings.
- Misses are silent. The README explains that model vision is not OCR: when pixels are unclear, the model fills in something plausible instead of throwing an error.
- It handles your traffic. pxpipe is a man in the middle by design: its SECURITY.md says it handles API credentials and may process confidential prompts and tool results. Keep it on its default loopback address.
- Fewer tokens isn't the same as a smaller bill. Much of what Claude Code re-sends is already cache-read at a discount, and PNG encoding adds some delay to big requests.
- Our numbers are from an offline export of a test log we made (53,957 characters to 3 pages, ~14,583 vs ~3,584 tokens by pxpipe's estimate). We did not run the proxy with Claude, and no model read our pages.
- It's a personal project by a developer named Steven (GitHub teamchong), not a Cloudflare or Anthropic product. It's trending, not new: the repo dates from May 2026, and v0.16.0 shipped November 11.
FAQ
Is pxpipe free?
Yes. It's open source under the MIT license, including for work use. You still pay for the model tokens you use; pxpipe tries to cut how many you send.
Why would a picture of text cost fewer tokens than the text?
Because Claude prices an image by its pixel size, one token per 28 by 28 pixel square, not by how much text is in it. Pack a page with tiny dense text and the page costs the same as a nearly empty one.
Does pxpipe work well with Opus 5.5?
Partly. pxpipe's own tests rate Opus 5.5 as good for gist and reasoning but weak on exact strings like IDs and hex, and its misses come with no error. Agents need tools to re-read exact values. The strongest reader in its tests is Gemini 4.
Does it change Claude's answers or output?
It only rewrites the request you send. Responses stream back normally, and your newest messages stay as text.
Is it safe to use on private code?
It runs locally and sees your prompts and API credentials, like any proxy would. Try it on a test project first, keep it on localhost, and read its SECURITY.md before using it on sensitive code.
Sources
- pxpipe on GitHub
- pxpipe README: the honest part (model tiers)
- Anthropic docs: how images are counted
- pxpipe-proxy on npm
Facts checked 2026-11-13 against the pxpipe README and license, the GitHub API (7,758 stars, v0.16.0), Anthropic's vision docs, and our own offline pxpipe export run on 2026-11-12.
Want help building with tools like this?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week and weekly-updated courses.
Join Shipping SkoolMore free guides
How ChatGPT Wallet Pays Without Seeing Your Card (and How to Set It Up)
OpenAI's new ChatGPT Wallet lets your dot pay for things on your behalf, and neither the agent nor the store ever sees your real card number. Here's how the stand-in card works and how to set it up.
Claude Code Custom Themes: Animated Backdrops and Your Own Colors
The Claude Code desktop app can now wear a theme: your own colors and an animated scene behind the chat. Here is how a theme works, two ways to get one today, and why you should treat a theme like code.
Astryx: Give Your AI Agent Meta's Design System So Every Screen Matches
Meta's open-source design system ships 150+ React components, seven themes and a CLI your coding agent reads from. What it is, how it works, how to set it up today, and the fine print.