pxpipe is a local proxy that reduces Claude API token costs by rendering text context as images.
The tool solves the problem of expensive token usage in long-context AI workflows by exploiting a fundamental difference in how language models price text versus images. While text tokens cost based on character count, image tokens cost only by pixel dimensions. pxpipe intercepts API requests before they reach Claude, converting bulky context—system prompts, tool documentation, and conversation history—into dense PNG images that pack roughly three times as many characters per token as plain text. The model reads these images through the same vision channel used for computer use screenshots. The tool measures token savings per request against a free token-count baseline, logging results locally so users can verify the actual reduction in their specific workloads.
Developers should adopt pxpipe if they run Claude Code agents with large system prompts, extensive tool documentation, or long conversation histories where token costs dominate the budget. The tool suits any workflow where context size matters more than latency—the proxy compresses only requests, leaving model responses unaffected and streaming normally. It works as a drop-in local proxy at 127.0.0.1:47821 with a dashboard showing token savings and text-to-image conversions side by side. For users who cannot modify their base URL, the tool offers a warp mode that works without changing ANTHROPIC_BASE_URL, preserving access to Claude.ai connectors and first-party gates. The tool also supports offline rendering of text, files, or diffs to PNG without running the proxy.
The project shows active development with recent work on benchmarking and measurement infrastructure, including scripts to generate context-window comparisons from live renders rather than hand-typed data. The codebase includes a working dashboard and demo showing real token counts and cost comparisons across different models. Documentation demonstrates the tool's behavior through concrete examples with actual pipeline output and measured density figures.