← Back
SiTech Team⏱️ 2 წთ. საკითხავი

pxpipe — Open-Source Tool Hides Text in PNGs to Slash AI Token Costs by Up to 70%

pxpipe — Open-Source Tool Hides Text in PNGs to Slash AI Token Costs by Up to 70%

Developer Steven Chong created pxpipe, an open-source proxy that converts long text prompts for Claude Code into compact PNG images, achieving 59-70% cost savings at the expense of some accuracy and speed.

Introduction: When AI Token Pricing Gets Circumvented

As artificial intelligence races forward, one of the most persistent challenges remains the cost of using these models. Companies that rely heavily on AI assistants like Claude Code spend thousands of dollars monthly on API calls. Enter pxpipe — an open-source tool that radically changes the approach to AI communication costs.

pxpipe is a local proxy that intercepts Claude Code requests and sends compact PNG images instead of raw text to the AI model. This method exploits Anthropic's pricing structure: text costs roughly one token per character, while images cost a fixed number of tokens based on pixel dimensions.

How Does pxpipe Work?

The principle behind pxpipe is simple yet cleverly effective. It transforms bulky text content — system prompts, tool documentation, older chat history — into compact PNG images. These images are then sent to the AI model, which reads them through its vision encoder.

Each PNG page measures 1928×1928 pixels, costing approximately 4,761 vision tokens, and can hold up to 92,000 characters.

Cost Savings and Real-World Results

According to developer Steven Chong, average savings range from 59 to 70 percent. In one Fable 5 demo, session costs dropped from $42.21 to $6.06 — an 85% reduction!

Accuracy and Limitations

The primary issue is accuracy: converting text to images is a lossy process. Exact character strings like hex values or hashes can be problematic. Fable 5 reads 13/15 exact hex strings correctly from images. Opus 4.7 and 4.8 are disabled by default in pxpipe due to lower accuracy.

Broader Implications for AI Pricing

pxpipe's growing popularity could force AI companies to rethink their pricing models. This represents a genuine pricing arbitrage — a loophole in the current token-based billing system.