teamchong/pxpipe

cut Claude Code token usage by rendering text context as images

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 15 minutes ago
Added to GitGenius on September 1st, 2026
Created on May 20th, 2026
Open Issues & Pull Requests: 58 (+0)
GitHub issues: Enabled
Number of forks: 640
Total Stargazers: 7,353 (+0)
Total Subscribers: 27 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 24.0 hours
Mean response time: 3.2 days
90th percentile: 11.6 days
Tracked items: 84

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 97% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 20% of issues opened in the past year have been closed. Three people close 95% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 32
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 43 days
Stale 30+ days: 21
Stale 90+ days: 0

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Detailed Description

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.