Back
Kevin Riedl

10 min read · 03 Jul 2026
Last reviewed

Next
Made on your device, with no Instagram connection. We copy the post link for Instagram’s Link sticker.

Pxpipe Review: Can Images Really Cut Claude Code Token Costs 60%?

The pxpipe authors report 59 to 70% lower end-to-end bills on measured Fable 5 Claude Code traces, but that is a workload-specific vendor benchmark with a new correctness risk. The proxy turns eligible bulk context such as system prompts, tool documentation, older history and large tool results into dense images before the request reaches the model. Recent turns remain text, while a bounded factsheet preserves only selected precision-critical strings. It does not guarantee that every identifier stays outside the images.

The reasoning sounds absurd, which is exactly why it went viral. Under a fixed model's vision rules, image-token count follows the image geometry rather than the amount of legible text inside it. That can make a dense picture much cheaper to process than the same characters as text.

pxpipe is an MIT-licensed local proxy for Anthropic, OpenAI, and Google-compatible request paths. Its current repository reports 59 to 70% lower end-to-end bills on tested Fable 5 workflows, while its SWE-bench runs preserved 10 of 10 Lite tasks and 14 of 19 Pro tasks versus 15 of 19 for plain text. Those are author-run benchmarks, not an independent guarantee.

Our verdict, fully reviewed September 2, 2026: image accounting can make dense visual text cheaper on a compatible model, but pxpipe should be a measured optimization for recall-tolerant context, not a default for production agents. The decisive question is whether your eval catches a silently misread identifier before the model acts on it.

Want a workload-specific answer on where your LLM spend is actually going?

 Review My LLM Cost Stack

Why this actually works: the pricing physics

Text and image input are counted differently. Their monetary rate depends on the selected model and provider price table, so visual-token reduction does not by itself prove the same percentage bill reduction.

Text is tokenized by content. Anthropic's current vision documentation counts an image as 28×28-pixel visual patches: ceil(width / 28) × ceil(height / 28). Images above a model tier's long-edge or visual-token limit are downscaled. Standard-tier models have a 1,568px long-edge and 1,568-token limit; Claude 4.7 and later high-resolution models have a 2,576px and 4,784-token limit. This replaces the old approximate (width × height) / 750 rule and invalidates a universal “about 1,600 tokens per image” cap. Within a fixed geometry, token count depends on dimensions rather than how much legible text the image contains. Anthropic vision documentation.

The repository reports about 3.1 characters per image token versus about one character per text token across its measured Claude Code traffic. Its illustrated dense page is a different, geometry-specific example: roughly 48,000 characters estimated at about 25,000 text tokens become about 2,700 image tokens, or about 17.8 characters per image token. These figures must not be combined into a universal break-even threshold. Profitability depends on density, page geometry, model-specific vision accounting, cache categories, output and how much traffic the proxy leaves untouched.

This is what the model actually receives instead of your text:

A dense wall of whitespace-minified text rendered as a single image, roughly 48k characters packed into about 2.7k image tokens, with an OCR instruction banner across the top
Around 48k characters of system prompt and tool docs, about 25k tokens as text, rendered as roughly 2.7k image tokens on one page. Source: the pxpipe repository (MIT), used for illustration.

You cannot pour unlimited context onto one canvas. Providers impose image-count, request-size, resolution and visual-token limits, and oversized images may be downscaled. pxpipe therefore renders multiple pages using model-specific profiles. The achievable saving depends on those pages and the target model, not on a universal per-image cap.

This is not a hack. It is a research direction.

The counterintuitive part, that pictures of text can be cheaper than text, is not a proxy-tool gimmick. It is an active area of research.

In October 2025, the DeepSeek-OCR preprint reported 97% OCR precision when text tokens were fewer than ten times the vision-token count, and about 60% at 20× compression. That is a model-specific OCR result, not a guarantee for commercial coding agents. The peer-reviewed EMNLP 2025 Findings paper Text or Pixels? It Takes Half reported often-near-half decoder-token savings without task degradation on its RULER retrieval and CNN/DailyMail summarization experiments.

The research establishes a legitimate direction, not transferability to every model, font, density or task. pxpipe applies the idea to commercial multimodal APIs with model-specific rendering profiles and author-run evaluations. That gap between a measured profile and an untested workload is where the risk starts.

The catch that makes it absurd for most work

Rendering text as an image is lossy, and the loss is silent.

When the model misreads an imaged character, it does not throw an error or flag low confidence. pxpipe's current exact-recall test makes the model recover 12-character hex strings from dense imaged content: Fable 5 scored 13 of 15, Gemini 3.6 and 3.7 Flash scored 14 of 15, Opus 5 scored 2 of 15, and GPT-5.6 Sol scored 0 of 15 on the older dense profile. That spread is why a result on one model cannot be generalized to another.

That is the risk in one sentence: anything you need back byte-exact must stay as text. IDs, hashes, secrets, exact numbers and precise names need an explicit text-preservation policy. pxpipe keeps recent turns as text and can place up to 96 recognized precision-critical tokens in a bounded factsheet, but its repository explicitly says a complete verbatim-risk guard is not yet built.

A few more things the headline skips:

  • It is model-dependent. In the author's dense-hex test, Fable 5 scored 13/15, Gemini 3.6/3.7 Flash 14/15, Opus 5 2/15 and GPT-5.6 Sol 0/15 on the older dense profile. The repository notes that Sol's shipped 14px profile has only a separate 7/8 pilot, so results are not directly interchangeable.
  • It adds latency. Encoding large requests to PNG takes time before the request even leaves your machine.
  • It interacts with prompt caching. Your biggest, most static context is also an ideal cache candidate. On Anthropic, pxpipe preserves or moves existing cache_control boundaries so the imaged prefix remains cacheable; its OpenAI accounting tracks cached tokens separately. Provider semantics differ, so compare against an observed warm-cache baseline. Anthropic documents cache reads at a fraction of standard input price in its prompt-caching guide.

When it is worth it, and when it will burn you

This is not a yes or no. It is a routing decision, the same discipline we apply to model selection. Match the technique to the payload.

Good fit for imagingDo not image this
Large, static system prompts and tool docsAnything byte-exact: IDs, hashes, secrets, keys
Read-only reference context and long docsExact numbers you will compute or quote
Collapsed, older conversation historyRecent turns the model must reason over precisely
Fable 5 or other strong image readersOpus-routed or vision-weaker workloads
Bulk context where gist is enoughAnything where a silent misread is unacceptable

If your workload is a huge, stable instruction block feeding a Fable 5 agent that mostly needs the gist, imaging can be a real win. If it is a compliance workflow moving exact figures and identifiers, the same trick is a quiet liability.

Where this fits in a real cost stack

Imaging context is one lever, and not the first one we would pull. Before reaching for a lossy trick, the boring levers usually win, and they do not risk your data:

Imaging context sits at the aggressive end of that list: high potential savings, real correctness risk, worth piloting on the right payload once the safer levers are in place.

Deciding which lever to pull, in what order, against a real bill rather than a benchmark is the work behind our AI enablement service: instrument the current spend, exhaust the lossless levers first, then gate anything lossy behind an eval that would actually catch a corrupted value. Twinsoft AI is that same sequencing applied to a production system, and our technology-selection guide states the general rule: decide against the constraint that is expensive to reverse.

Kevin Riedl

"The pricing physics is real and the research is serious. But a 60% saving that occasionally invents a hash or a name is not a saving, it is deferred debugging. Image the bulk context that only needs the gist, keep every exact value as text, and never point it at a model that reads images poorly."

Frequently Asked Questions

Is rendering context as images safe for production?
Only for context where a silent misread is acceptable, such as large static instructions or read-only reference material fed to a model that reads images well. It is lossy, so keep anything byte-exact (IDs, hashes, secrets, exact numbers) as text. Treat it as a targeted optimisation on the right payload, not a default.
Does imaging context break prompt caching?
Not inherently. pxpipe preserves or moves existing Anthropic cache-control boundaries around the imaged prefix, and accounts for cached tokens separately on OpenAI. Because each provider's semantics differ, compare imaging with an observed warm-cache baseline rather than an uncached request.
Why does Opus do worse than Fable at reading imaged text?
It is model-dependent. On pxpipe's own dense-hex test Fable 5 scored 13 of 15 and Opus 5 scored 2 of 15. Current defaults allow Fable 5 and Gemini 3.6/3.7 Flash; Opus and GPT-5.6 Sol are opt-in. Treat these as author-run, profile-specific results.
Is this the same as DeepSeek-OCR?
It is the same underlying idea, optical context compression, applied differently. DeepSeek-OCR is a model trained to decode text from a small set of visual tokens at about 10x compression. pxpipe is a proxy that images your context for existing commercial APIs that were not trained specifically for it, which is why the loss shows up.
How much can it actually save?
The pxpipe repository claims a 59 to 70% lower end-to-end bill on Fable 5 and shows a demo task at $42.21 text versus $6.06 imaged. Treat that as the tool author's own figure on their own workload and re-measure on yours, against a cached baseline.

Final thoughts

So, genius or absurd? Both. The mechanism is real, vision tokens are counted from image geometry under model-specific rules, and relevant research shows compression can work on particular benchmarks. But applying it to a model or workload that has not been validated trades money for silent errors, and silent errors are the most expensive kind.

Use it the way you would use any aggressive optimisation: deliberately, on the payload that fits, with byte-exact values explicitly kept as text and the safer levers, caching, routing, measurement, already in place. Do that and imaging bulk context is a sharp tool. Turn it on everywhere and it will eventually hand you a confidently wrong answer you never see coming.

Production AI help

Building an AI product and worried about inference cost, architecture, or production readiness? Wavect helps founders turn AI prototypes into reliable production systems.

Explore the service path:

Inbox, without the noise

Follow the work that matters to you

Get a short email when we publish something new. Follow the whole blog or only the problems you care about.

What would you like to receive?
Choose your topics

Free, double opt-in, no tracking pixels.

Back
Kevin Riedl

10 min read · 03 Jul 2026
Last reviewed

Next

Get the next AI and agents field note

One concise email when we publish. No tracking pixels, and no inbox filler.

Free, double opt-in, no tracking pixels.