415.tech
AI & tech, from the frontlines of Silicon Valley
pxpipe renders static prompt context as dense PNGs to cut token costs 59-70%

pxpipe renders static prompt context as dense PNGs to cut token costs 59-70%

Steven Chong's open-source pxpipe is a local proxy that renders static context — system prompts, tool docs, older chat history — as a single dense PNG, turning roughly 25,000 text tokens into about 2,700 image tokens because Anthropic prices images by pixel size, not character count. A developer can route Fable 5 or GPT 5.6 sessions through it today for 59-70% average savings — one demo fell from $42.21 to $6.06 — at the cost of garbled exact strings like hashes and a slower vision-encoder pass.

Source: the-decoder.com

Post on XEmail

Text costs roughly one token per character, but images cost a fixed number of tokens based on their pixel dimensions, no matter how much text they contain.

the-decoder.com

Why this matters

  • → Cuts LLM API costs by 59-70% via image-token arbitrage
  • → Exploits Anthropic's pixel-based pricing model for dense static content
  • → Trade-off: accuracy loss and slower inference for major savings
Pixels over tokens