Skip to content

claude-code

pxpipe hides text in PNGs to cut token costs by up to 70%

Claude News

The open-source tool pxpipe converts large text chunks in Claude Code requests into dense PNG images to save on token usage. The trick exploits Anthropic's pricing: text costs roughly one token per character, while images cost a fixed amount based on pixel dimensions.

pxpipe runs as a local proxy. It intercepts requests and renders static content like system prompts, documentation, and chat history into images. For example, a 48,000-character prompt costs about 25,000 tokens as text, but only 2,700 tokens as a PNG.

Developer Steven Chong reports average savings of 59% to 70%. In a Fable 5 demo, session costs dropped from $42.21 to $6.06. The trade-off is that the method is lossy. Exact strings like hashes can be misread, and processing is slower due to the vision encoder.

Related stories

  1. rtk promised 60-90% fewer tokens. JetBrains measured 7.6% more spend
  2. ctx2img packs whole repos into image tiles, cutting token use 60-75%
  3. Claude Code 2.1.243 uses your contracted model rates
  4. CCLimitPing automates the 5-hour Claude Code window
  5. Leak puts expandable usage limits in Claude Code desktop
  6. Claude Code 2.1.283 keeps new models out until admins say so

Comments

No comments yet. Be the first.

Join the conversation

Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.

We only use your name and avatar from Google. We never store your email address.