Introduction
A surprisingly old-school trick has started getting attention in the Fable 5 community: turn long text context into dense images, then let the model read the images back through its vision capability.
It sounds almost like making a tiny cheat sheet for an exam. But in this case, the “cheat sheet” is not for a person. It is for a multimodal model that can read screenshots. One developer found that by converting Claude Code context into tightly packed PNG images, the input token bill could drop by roughly 59% to 70% in tested workloads.

The basic idea is simple: system prompts, tool documentation, command outputs, logs, and older conversation history are often extremely token-heavy. If those blocks are rendered into images, their image-token cost is mainly tied to image dimensions rather than the amount of text packed into the image.
This article walks through what pxpipe does, why the method can save money, where it breaks down, and how it connects to earlier research such as CLIPPO and newer optical-context-compression work like DeepSeek-OCR.
Source Note
This article is based on the original Chinese article published on BAAI Hub, which states that the source came from QbitAI on WeChat. The original reference links include the pxpipe GitHub repository and the CLIPPO paper. Images kept below are article-relevant screenshots, demos, diagrams, and social discussion screenshots. QR codes, promotional follow prompts, engagement CTAs, and unrelated platform decoration have been removed.
Turn Context into a “Cheat Sheet” and Cut the Bill
The method that went viral is called pxpipe. It is an open-source local proxy that rewrites bulky Claude Code input context before the request leaves your machine.
According to the project description, pxpipe reduces token usage by rendering large text blocks as images. The same system prompt, tool docs, tool outputs, and older history can be packed into a much smaller token footprint when the model is capable enough to read dense rendered text.

In one example, about 48,000 characters of system prompt and tool documentation would take around 25,000 tokens as plain text. Rendered into a 1573 × 1248 image, the same content reportedly used about 2,700 image tokens.
That difference is where the cost reduction comes from.
The rough logic is:
- Text token cost grows with the amount of text.
- Image token cost is largely determined by pixel dimensions.
- Dense code, JSON, tool output, system prompts, and logs often contain many tokens per line.
- If the model can still read the compressed image reliably, the same context can become cheaper to send.
Some developers joked that this is a literal case of “a picture is worth a thousand words.” In this case, the joke is unusually close to the technical reality.


What pxpipe Actually Does
pxpipe is not a new model, and it is not a traditional OCR engine. It works as a local proxy between Claude Code and the model API.
Before a request is sent out, pxpipe looks for large blocks that are suitable for compression. It then renders those blocks into compact PNG pages and places them back into the request as image inputs. The model reads those pages using its normal vision channel.


In plain terms, pxpipe behaves like an automatic micro-printer for long context. It does not make the model “OCR” text in the strict engineering sense. Instead, it relies on the model’s built-in ability to read screenshot-like visual input.
The pxpipe README explains that it focuses on bulky input context such as:
- Large
tool_resultbodies, including file reads, command output, and logs. - Older collapsed conversation history.
- Static system prompts and tool documentation.
It deliberately avoids converting everything. Recent turns, user messages, exact identifiers, small blocks, sparse prose, and model output remain text.
Why It Can Save So Much
The core pricing mismatch is that image inputs and text inputs are measured differently.
For text-heavy developer workflows, the source material is often token-dense. Code, logs, JSON, stack traces, and tool schemas can be expensive when sent as plain text. pxpipe’s author estimates that in real Claude Code traffic, dense content can pack roughly 3.1 characters per image token, compared with about 1 character per text token.
That ratio gives pxpipe room to reduce cost when the text is dense enough.
The author also shared a comparison demo. In the original text version, a test run reportedly ended with a bill of $42.21 and a nearly full context window. In the pxpipe version, the same task completed at $6.06 with much more context space left.

The important detail is that pxpipe only compresses the request side. The model’s response still streams back normally as text. It does not compress output tokens.
Benchmark Results and the Main Caveat
The method is impressive, but it is not lossless. Dense image context depends heavily on the model’s visual reading ability.
The pxpipe benchmark screenshot shows that Fable 5 performs well on several image-context tasks, including novel arithmetic, gist recall, state tracking, and some dense-render recall tests. But exact string recall is a weak point, especially on models that are not strong dense-text readers.

A simplified version of the reported benchmark table looks like this:
| Test | N | Text | pxpipe Image | Token Change |
|---|---|---|---|---|
Novel arithmetic, claude-fable-5 | 100 | 100% | 100% | -38% |
Novel arithmetic, claude-opus-4-8 | 100 | 100% | 93% | -38% |
| Gist recall A/B, Fable 5 | 98 per arm | 98/98 | 98/98 | — |
| State tracking, Fable 5 | 18 per arm | 18/18 | 18/18 | — |
| Confabulation on never-stated facts, Fable 5 | 16 per arm | 0/16 | 0/16 | — |
| Verbatim 12-char hex recall, Opus | 15 | 15/15 | 0/15 | — |
| Verbatim 12-char hex recall, Fable 5 | 15 | — | 13/15 | — |
The danger is clear: image-based context can be good enough for broad semantic understanding, state tracking, and many coding tasks, but it can silently misread exact strings.
IDs, hashes, secrets, fixed numbers, and other byte-exact values should not be pushed into dense images. pxpipe’s own notes make this point: the tradeoff is serious, and the failure mode can be a confident but wrong answer rather than an obvious error.

What pxpipe Keeps as Text
Because the compression is lossy, pxpipe does not blindly render every input block as an image. It keeps sensitive and precision-critical content in text form.
Examples that should stay as normal text include:
- IDs and hashes.
- Secrets and keys.
- Exact numeric values.
- Recently active conversation turns.
- User messages.
- Sparse prose that is not token-dense enough to benefit.
This is also why the project positions the savings as workload-dependent. If the request is mostly long natural-language prose, the compression may not be profitable. If the request is packed with code, JSON, logs, and tool output, the savings can be much larger.
幾分鐘搭建展示站並增長獲客
輸入一句想法,We0 AI 即可生成展示站、頁面與 CMS。發佈上線後並幫你獲取客戶和流量。
How to Try pxpipe
The author gives a very short startup flow. Run the proxy locally, then point Claude Code at the proxy.
npx pxpipe-proxy # proxy on 127.0.0.1:47821
ANTHROPIC_BASE_URL=http://127.0.0.1:47821 claude # point Claude Code at it
After startup, pxpipe also exposes a local dashboard:
http://127.0.0.1:47821/
The dashboard can show token savings, side-by-side text-to-image conversions, a kill switch, and live model tags. This makes it easier to see exactly what is being compressed and what is passing through unchanged.
Google’s 2022 CLIPPO Paper Had Already Pointed in This Direction
After pxpipe started spreading, some researchers pointed out that the core idea is not completely new.
A related line of work appeared in Google’s 2022 paper CLIPPO: Image-and-Language Understanding from Pixels Only. The central idea in CLIPPO is to treat text as pixels rather than as a separate tokenized text stream.

Traditional CLIP-style models often use two towers: one for images and one for text. CLIPPO removes that split by rendering text as RGB images and sending both images and rendered text through a shared Vision Transformer.

The takeaway is important: text does not always have to enter a model as discrete text tokens. It can also be converted into pixels and processed through vision pathways.
DeepSeek-OCR and Optical Context Compression
The discussion also brought up DeepSeek-OCR, which focuses on optical compression for long context. Its repository describes the project as “Contexts Optical Compression.”


In that sense, pxpipe is not just a one-off cost trick. It connects several trends:
- CLIPPO showed that text can be processed as images.
- DeepSeek-OCR explored long-context optical compression.
- Fable 5 appears strong enough at dense visual reading for this to become useful in real coding workflows.
There is still a hard limit: exact-string reliability. Some commenters suggested that the problem might improve simply by scaling up stronger vision-language models.

Practical Takeaways
pxpipe is most useful when the context is large, dense, and not precision-critical. Coding sessions are a natural fit because agents often re-read files before editing them, which can reduce the risk of acting on a misread image block.
It is less suitable for workflows where exact character-level recall matters. If a task depends on identifiers, hashes, credentials, exact legal language, financial numbers, or similar precision-sensitive content, image-based compression should be treated carefully.
A sensible way to use pxpipe is to keep it as an optimization layer, not as a trust boundary. Let it compress bulky context where the math works, but keep critical values in text and review the dashboard when debugging strange model behavior.
FAQ
What is pxpipe?
pxpipe is a local proxy that reduces token usage by rendering bulky Claude Code input context into compact PNG images. It is designed for dense context such as tool outputs, logs, code, system prompts, and older conversation history.
How does pxpipe reduce Fable 5 costs?
It takes advantage of the fact that image token cost is tied mainly to pixel dimensions, while text token cost grows with the amount of text. If a model can read dense rendered text reliably, large blocks can be cheaper as images than as plain text.
Does pxpipe compress model output?
No. pxpipe only compresses selected input blocks before the request is sent. The model’s response still streams normally as text, so output tokens are not reduced.
Is image-based context compression lossless?
No. It is a lossy compression method. It can work well for broad context, state tracking, and many coding tasks, but exact strings such as IDs, hashes, secrets, and precise numbers may be misread.
Can I use pxpipe with any model?
Not safely. pxpipe’s own documentation treats model support as limited and workload-dependent. Some models read dense rendered text much worse than others, so unsupported or weaker models should pass through as text unless explicitly enabled.
What kinds of content should stay as text?
IDs, hashes, secrets, exact numbers, user messages, recent turns, and other precision-critical blocks should stay as text. pxpipe is better suited for long, dense, less byte-sensitive material such as logs, tool docs, and old history.
How do I run pxpipe locally?
Start the proxy with npx pxpipe-proxy, then run Claude Code with ANTHROPIC_BASE_URL=http://127.0.0.1:47821 claude. The local dashboard is available at http://127.0.0.1:47821/.
Related Tools
- pxpipe: A local proxy that renders bulky Claude Code context into PNG images to reduce input token usage.
- Claude Code: Anthropic’s agentic coding tool for terminal, IDE, desktop, and browser workflows.
- Anthropic Messages API: The API surface that Claude-style message requests are sent through.
- Anthropic Token Counting: The official API reference for estimating token counts in message requests.
- DeepSeek-OCR: An open-source project exploring optical compression for long-context text.
Related Links
- Original BAAI Hub Article: The Chinese source article that discussed the viral pxpipe cost-saving method.
- pxpipe GitHub Repository: Project source code, README, benchmarks, limitations, and usage commands.
- CLIPPO Paper on arXiv: The 2022 paper exploring image-and-language understanding from pixels only.
- DeepSeek-OCR GitHub Repository: Official repository for Contexts Optical Compression.
- Claude Code Documentation: Official documentation for using Claude Code across different environments.
- Anthropic Computer Use Tool: Official documentation for Claude’s screenshot-based computer interaction capability.
- Anthropic Messages API: Official reference for sending message-based requests to Claude models.
Summary
pxpipe shows a clever way to reduce Fable 5 input costs: render token-heavy context into compact images and let the model read those images through its vision capability. For dense coding workloads, this can significantly reduce request-side token usage and lower end-to-end cost.
The tradeoff is that the method is lossy. It can preserve enough meaning for many coding and state-tracking workflows, but it should not be trusted for byte-exact recall of IDs, hashes, secrets, or precise numbers.
The broader point is that text does not always have to stay text inside AI systems. CLIPPO, DeepSeek-OCR, and pxpipe all point toward the same idea: pixels can become a practical compression layer for long context.
The best use case is clear: compress bulky, low-precision context, but keep critical exact values in normal text.



