Pxpipe: Cutting Token Costs by Converting AI Inputs into Compact PNG Images

July 4, 2026
Pxpipe: Cutting Token Costs by Converting AI Inputs into Compact PNG Images
  • Pxpipe is an open-source local proxy that converts long Claude Code inputs into compact PNG images to reduce token costs, effectively compressing bulky content before it reaches the model.

  • By rendering system prompts, tool docs, and older history as images, pxpipe dramatically lowers input tokens while leaving model outputs unchanged.

  • Benchmarks show substantial end-to-end token savings, typically in the 59% to 74% range, though results vary with workload, document density, and the model used.

  • Imaging is lossy and not byte-exact; some content (IDs, hashes, exact numbers) must remain text to avoid silent errors, and not all models or inputs benefit equally.

  • Benchmarks and findings are hosted in the pxpipe repository, with The Decoder cited as a source for AI news and analysis.

  • Default model support includes Claude Fable 5 and GPT 5.6, with additional models like Opus 4.7/4.8 and GPT 5.5 explored in benchmarks; accuracy varies and features can be toggled manually.

  • Historical context notes that compressing text as images has precedents, such as Deepseek’s OCR-based approach achieving high reduction while preserving most information.

  • Practical demonstrations compare pxpipe-enabled runs against baselines, showing significant token reductions and lower perceived costs in measured traces.

  • Quick-start guidance is provided, including model configuration options, a no-proxy rendering path for PNGs, and a live dashboard to monitor token savings and per-session stats.

  • Open-source with MIT license, containerized deployment, and guidance to reproduce results from local event logs, with caveats about relying on imaging for exact recall.

  • In practice, pxpipe renders bulky static content like system prompts, tool docs, and older chat history as images, while recent messages and model outputs remain in text.

  • The proxy intercepts /v1/messages, re-renders bulk history into image blocks, preserves prompt caching, and logs per-request events for token accounting and auditing.

Summary based on 2 sources


Get a daily email with more Startups stories

More Stories