top of page

Pxpipe Reduces Claude Code Costs by Rendering Inputs as Images

Pxpipe is a local proxy that turns dense text into PNG images before requests reach Claude Code. The change lets users cut input token counts sharply while keeping the same model responses.

The project launched on GitHub in early 2026. It targets high-volume Claude Code users who hit cost ceilings on long context sessions. Early tests on SWE-bench Lite show the full 10-instance set completed at roughly half the prior bill.

How the proxy works in practice

Pxpipe sits between the user client and Anthropic’s API. It intercepts system prompts, tool definitions, and conversation history on supported models. The text is rendered into one or more PNG frames sized to balance pixel count against readability.

Each frame is then passed as an image block. Anthropic prices image tokens by the total pixels in the request rather than by characters, so the same information occupies far fewer tokens once converted. The default model filter limits the behavior to claude-fable-5 unless the PXPIPE_MODELS variable is edited. Anthropic’s image token pricing and rate documentation confirm the pixel-based calculation.

The method is lossy for exact strings such as file paths or numeric IDs. Those elements stay in plain text while the rest of the context is compressed. Users can toggle the mode or maintain a short allow-list for critical tokens.

Measured savings on benchmark tasks

On SWE-bench Lite the proxy processed ten instances that previously cost $54. The image route finished every task for $27. On SWE-bench Pro, eighteen of nineteen runs produced identical verdicts to the text-only baseline while each request cost about 60 percent less.

The compression ratio observed on Fable 5 reached roughly 25 000 text tokens down to 2 700 image tokens. That figure held across multi-turn debugging sessions that included full repository snapshots and test logs. End-to-end bills dropped between 59 and 70 percent depending on how much of the context qualified for image rendering.

Pxpipe maintainer teamchong noted on the repository that “real-world multi-turn sessions with 20k+ context routinely see 60 percent-plus reductions when tool schemas stay in text.”

Limitations that still require manual checks

Because the conversion discards some textual precision, any workflow that embeds unique identifiers or literal code snippets must keep those portions outside the image path. Pxpipe ships with a conservative default that leaves short tool call blocks untouched.

The method applies only to Anthropic’s current image pricing schedule. If the vendor adjusts pixel-to-token rates, the savings ratio will shift. The proxy does not yet support other providers that expose similar image billing.

Some users report occasional formatting drift when tables or aligned columns are rasterized - for example, a 4-column benchmark table may see its vertical alignment shift by one or two characters, making side-by-side diffs harder to scan at a glance. The project maintainers suggest running a small validation set on any new code base before committing the change to production pipelines. Users can mitigate drift by keeping critical tables or aligned code blocks in the text allow-list.

Who benefits most from the approach

Teams that run continuous Claude Code agents on large repositories see the clearest impact. The proxy reduces the per-turn cost without forcing changes to existing prompts or tool schemas. Solo developers working on personal projects also report noticeable drops once context windows exceed 15 000 tokens.

The approach matters now because Claude Code usage has grown faster than competing agent runtimes. Higher session lengths directly increase exposure to input token pricing, making any reliable compression technique immediately relevant to cost control.

What remains uncertain after the initial tests

The published numbers cover two curated benchmark suites. Real-world code bases may contain more edge cases that reduce the effective compression ratio. No public data yet tracks month-long usage patterns or variance across different repository sizes.

Anthropic has not commented on whether image-based requests will continue to receive the same priority scheduling as text requests. Any future change in queuing behavior would affect latency even if dollar savings remained stable.

Signals to watch in the coming months

Track whether SWE-bench Pro participation numbers rise among teams that publicly adopt Pxpipe. An increase would indicate that the cost reduction is translating into broader experimentation.

Watch for updates to Anthropic’s image token calculator. A revision that raises the pixel multiplier would shrink the gap that Pxpipe currently exploits.

Observe whether other agent frameworks release similar local preprocessors. Parallel projects would signal that the market treats image-token conversion as a standard optimization rather than a niche workaround.

Users evaluating the proxy should start with their own validation set rather than relying solely on benchmark reports. The code is open on GitHub at https://github.com/teamchong/pxpipe and runs entirely on the local machine before any data leaves for Anthropic.

Get started for free

A local first AI Assistant w/ Personal Knowledge Management

For better AI experience,

remio only supports Windows 10+ (x64) and M-Chip Macs currently.

​Add Search Bar in Your Brain

Just Ask remio

Remember Everything

Organize Nothing

bottom of page