pxpipe · 2026-07-03 · notable
pxpipe — proxy that renders Claude Fable 5 context as PNGs to cut input tokens
pxpipe is a localhost proxy for Anthropic's API that rewrites bulky system prompts, tool docs, and older chat turns as PNG images the model reads with vision. Cuts input tokens 59–70%; MIT-licensed, runs with npx.
A tiny local proxy that trades text tokens for image tokens by rendering your context as PNGs.
Key specs
| Input token reduction | 59–70% |
|---|
What is it?
pxpipe is an MIT-licensed proxy that sits between a Claude client and Anthropic's API on 127.0.0.1:47821. Version 0.7.1 shipped July 3, 2026, on GitHub. It rewrites the bulky, repeat parts of a request — system prompt, tool docs, older chat turns — as PNG pages with a small OCR-style header, and forwards the modified request upstream.
How does it work?
Requests to /v1/messages are intercepted; eligible history is re-rendered as PNG pages that the model reads through its normal vision path. Since image tokens on Claude Fable 5 and GPT-5.6 Sol are priced by pixel dimensions, dense code and JSON pack far cheaper as images than as plain text. Fresh user turns and small system messages are left untouched so responsiveness holds.
Why does it matter?
Long-running Claude Code sessions rack up input-token bills because the whole chat history rides along on every call. pxpipe reports a 59–70% end-to-end input reduction on real workloads, matched 10/10 baseline on SWE-bench Lite and traded 14/19 vs 15/19 on SWE-bench Pro for a 60% per-request cut. Its README warns that vision reads are lossy — Opus 4.7 and 4.8 are off by default because of an observed ~7% misread rate.
Who is it for?
Claude Code and Anthropic API users with long-lived contexts and token bills to trim.
Try it
npx pxpipe-proxy && ANTHROPIC_BASE_URL=http://localhost:47821 claude