ByteCosts
pxpipe-text-as-images-review.mdx

AI Coding Agents

pxpipe Review: Text as Images for Coding Agents

pxpipe is a local proxy that renders eligible agent context as PNGs and sends them as image inputs. It can shrink the token count on dense payloads when the provider’s image-token calculation is favorable and the model can read the rendering. Test exact recall and cache charges before enabling it for routine coding work.

At a glance

QuestionAnswer
What is it?A local proxy that turns eligible text into PNG image inputs.
What cost does it target?Input from dense text when the provider’s image metering makes the same material cheaper to send.
Where does it act?On outbound model requests, where eligible material can become image blocks with a text factsheet.
How do you try it?Start with an offline export from the pxpipe-proxy npm package, then try the local proxy.
How do you recover exact values?Read them from the original text. The rendering can lead the model to confuse similar glyphs.
How do you undo it?Use the dashboard kill switch to stop imaging. Restore the original base URL if you changed it manually.
When is it a good fit?Dense inputs on a supported model when you can verify exact values against the source.
When should you skip it?Sparse prose, workloads served mainly from text cache, or exact extraction without a recovery path.

What changes in the request

Dense JSON and command results can tokenize into many pieces because text tokenization depends on the sequence of characters. An image encoder receives pixels instead. Drawing those same characters into a compact page can make the region cheaper to send as image input. The saving depends on the model’s image metering, the page geometry, and how well the text fills the page. Sparse prose may already tokenize efficiently enough to stay as text.

pxpipe captures eligible requests from a local coding client. Its render profile can turn bulky material such as tool documentation and older history into PNG image blocks and attach a bounded text factsheet for details that benefit from exact representation. It keeps recent turns as text. The replacement also depends on the API path. On the Responses path, the README says tool definitions stay native JSON and completed tool exchanges can be imaged as units. The project describes the proxy as changing requests and streaming model responses normally. pxpipe README

Why image tokens can be cheaper and exact reads can get worse

Image cost comes from how a particular model’s provider processes the rendered dimensions. The project’s capacity table describes a Claude profile using 28-pixel patches and a Gemini profile with a different per-page estimate. Pixel density can fit more characters in a given billed region, but making rows smaller or closer together can make them harder to read. Compare profiles using the actual rendered dimensions and provider counters. The PNG’s file size measures storage and transfer, and is a poor substitute for the provider’s token count. pxpipe profiles and cost checks

The project’s own evaluations illustrate why exact recall deserves a separate check. It reports that Gemini Argon answered 15 of 15 pure-image dense hex probes, while Opus 5.5 scored 3 of 15 on dense hex. The stronger result on the small probe still leaves gaps on other corpora. The README describes similar glyphs being confused and says the project kept the factsheet after observing those errors. For coding work that uses a ticket ID, checksum, path, or line number to take an action, ask the model to recover that value from ordinary text and compare it with the original. A readable gist can coexist with a wrong identifier. pxpipe quality findings

Pay particular attention to the fallback if the agent intends to edit code based on the image. A lookup that recovers an identifier from the original file needs to confirm that the file is still at the right revision and that the surrounding row or symbol matches. A benchmark question can accept the exact string alone, while a coding task may depend on what that string identifies.

Start offline, then try the proxy

The README documents an offline export that generates page PNGs, a factsheet, a manifest, and a prompt. The README’s npx pxpipe-proxy examples use an unpinned package. Pin a reviewed version before running the examples. Start from a disposable project with a dense fixture. Check that lines wrap clearly, that the factsheet refers to the right source, and that the model can answer a question with a known exact answer.

npx pxpipe-proxy export src/

The README also documents starting the local proxy and launching an agent through the wrapper. The proxy handles authenticated requests to Anthropic and OpenAI, including API-key or OAuth traffic, depending on client setup. Launch the matching client in a second terminal, then use the dashboard to verify which payloads were converted.

npx pxpipe-proxy
pxpipe warp -- claude
pxpipe warp -- agy

For rollback, use the dashboard’s kill switch to stop imaging, or exit the wrapped agent, stop the proxy, and start the client normally. If you changed the client’s provider base URL manually, restore the original setting. Verify that requests go directly to the provider and that the agent can still read earlier source material. The available README excerpt documents the kill switch and the option to disable imaging, but ends before any package removal instructions. Remove local exports and event logs separately if they were created only for the trial. pxpipe setup and configuration

What the project measured

The project reports roughly 59 to 70% lower end-to-end bills in its original Fable runs. Its Fable SWE-bench Lite pilot had 10 of 10 successes with either input representation and a reported 65% reduction in request size. On SWE-bench Pro it reports 14 of 19 successes with pxpipe and 15 of 19 with text, with a 60% reduction in request size. These results are from the project, and the specific agent and model limit how far they generalize. The local evidence does not supply an independent session-level billing comparison. pxpipe project evaluations

The README also documents a per-request comparison against a token-count estimate of the original form. Use the comparison to check how much the wire representation changes. Then compare completed tasks, because the count on a transformed request cannot tell you whether the agent needed another call to recover an exact value.

Estimate the image bill with the actual token counts

In the project’s offline check, the corpus came to an estimated 122,715 text tokens and 23,856 image tokens with the dense Claude profile. The project calculated image tokens from page dimensions using the provider formula. The README says Opus 5.5 uses spaced rows with about 25% more image tokens, which gives roughly 29,800 for this corpus. For a cost estimate at the committed Opus rate of $4 per million fresh input tokens, (122,715 − 29,800) × $4 per million saves about 37 cents before factsheet and recovery costs. Test exact recall separately on the Opus rendering.

Include factsheet tokens and any additional turns in the final comparison. The cost reverses if the text qualifies for cache reads and the images are fresh input. In this estimate, 122,715 × $0.20 per million is about 2.5 cents for text, while 29,800 × $4 per million is about 12 cents for images. Even when a proxy preserves a static prefix, compare actual cache hits over the task, especially after a transport change. Provider pricing index Prompt caching prices

What the issues say about transport and forks

An open issue describes Claude Code sending thread deltas that bypass compression. pxpipe needs the bulk history to be present in the request before it can render it. The README documents transport workarounds, including a wrapper setting based on an undocumented Claude Code environment variable. Confirm what your current client sends and check whether preserving the usual transport is important to you. A closed issue also describes prompt-cache prefixes alternating during a session. Use provider counters to check stability over several requests. Thread delta report Prompt-cache prefix report

Issue titles mention a Windows port and a desktop UI. Check any fork’s source and request path before applying upstream results. Open issue titles describe system text re-emitted inside a user-role image, system or environment text reinserted in a way that resembles prompt injection, and Fable 5 refusing imaged input the reporter described as benign. Check instruction roles and refusals in your own trial. Windows port discussion Desktop UI discussion Role placement report System text report Fable refusal report

Who should use it and how to test

The README’s full-fidelity tier includes Gemini 4 and the original Fable 5. It lists Claude Sonnet 5.5, Haiku 5.5, and GPT-6.2 Sol as unsupported for imaging. It limits Opus 5.5 to gist and agent history in sessions where tools can re-fetch exact values. Keep text for extraction without recovery tools, sparse prose, and workloads served mainly from text cache. pxpipe model tiers

  • Hold the client, model, task, and starting state fixed. Repeat runs with native text and with imaging enabled.
  • Include both gist and exact-match questions. Plant similar identifiers on different rows to expose misreads and incorrect row associations.
  • Verify which requests were imaged. Record reported input, cache use, output, latency, retries, and turns spent on text recovery. Compare cost per accepted task. How to measure coding agent token savings

Alternatives that keep evidence in text

Headroom can compress eligible context and make originals available for retrieval. context-mode can index full outputs and return matching excerpts. Try those approaches if exact text is important and the agent can request a narrow part of the payload. Headroom review context-mode review

Sources

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

pxpipe Review: Text as Images for Coding Agents. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/pxpipe-text-as-images-review/

Sources