Cut Claude Code token costs by rendering system prompts & history as images
pxpipe is a local proxy that intercepts Claude Code API requests, rendering bulky text parts like system prompts, tool docs, and old history into compact PNG images. Since image token pricing depends on pixel dimensions rather than text length, the approach cuts input tokens by ~60%, leading to a 59–70% end-to-end cost reduction. It rewrites requests before they leave the machine, preserving prompt caching. By default it works with Claude Fable 5 and GPT-5.6, with dashboard controls for opt-in models. It includes profitability gates and benchmarks showing near parity in coding tasks, though exact-string recall is lossy. The project is aimed at developers using LLM coding agents who want to slash API costs without sacrificing functionality.