pxpipe: An open-source proxy that cuts LLM token usage by rendering text context as images
By
dimitropoulos
Summary
pxpipe is a local proxy tool that reduces token usage in Claude Code (and similar LLM applications) by converting bulky text context — such as system prompts, tool documentation, code, JSON, and history — into compact PNG images before sending them to the API. Since image token costs are determined by pixel dimensions rather than text density, dense content achieves roughly 3.1 characters per image-token compared to ~1 character per text-token. The approach leverages the same vision channel Anthropic's computer use feature uses for screenshots. The tool is open-source and available on GitHub.
Source
Key quotes
· 4 pulledAn image's token cost is fixed by its pixel dimensions, not by how much text is inside it.
Dense content (code, JSON, tool output) packs ~3.1 chars per image-token vs ~1 char per text-token on real Claude Code traffic.
The reader is the same vision channel that Anthropic's computer use already relies on for screenshots.
pxpipe is a local proxy that uses that channel for context: it rewrites the bulky parts of each request into compact PNGs
You might also wanna read
Tokenwise: An LLM proxy tool that helps developers track and reduce API spending
Tokenwise is a lightweight LLM proxy tool designed for makers and small teams to monitor and optimize their API spending on large language m
Token Budgeting: How Context Engineering Can Slash Your LLM Costs
This article debunks the common misconception that token optimization for LLMs is simply about writing shorter prompts. It reframes token op
dev.to·16d agoContext Gateway: Tool to Reduce Latency and Costs for Claude Code AI Assistant
Context Gateway is a tool designed to optimize the performance and cost of using Claude Code (and similar AI coding assistants like Codex/Op
Sipcode: A context hygiene tool for Claude Code that reduces noise and improves AI response quality
Sipcode is a tool for Claude Code that improves context hygiene by capping verbose tool outputs and deduplicating same-session re-reads, all
Pixcode: An open-source, self-hosted web UI for managing multiple AI coding agents
Pixcode is a free, open-source, self-hosted control room that lets developers manage multiple AI coding agents (Claude Code, Cursor CLI, Cod
LunaRoute: A High-Performance Secure Local Proxy for AI Coding Assistants
LunaRoute is a high-performance secure local proxy designed for AI coding assistants like Claude Code, Codex, and OpenCode. It provides comp

Comments
Sign in to join the conversation.
No comments yet. Be the first.