pxpipe: Cut Claude Code Token Usage 60% by Rendering Context as Images

✍️ OpenClawRadar📅 Published: July 4, 2026🔗 Source
pxpipe: Cut Claude Code Token Usage 60% by Rendering Context as Images
Ad

pxpipe is a local proxy that exploits a pricing gap: AI models charge for images by pixel dimensions, not by embedded text density. For bulky context like system prompts, tool docs, and history, this means ~3.1 characters per image token vs ~1 char per text token on real Claude Code traffic. The result is a ~59–70% cost cut (list prices) and a ~72–74% cut on compressed requests, with the primary metric being input-token reduction — e.g., ~25k text tokens rendered as ~2.7k image tokens.

How it Works

pxpipe runs as a local proxy intercepting requests from Claude Code/Gateway. It rewrites the bulky parts (system prompt, tool documentation, older history) into compact PNG images before the request leaves your machine. The proxy also includes an OCR instruction banner co-rendered on top so the model can read the text reliably. Fable 5 achieves 100/100 read accuracy on a clean eval. Opus 4.8 struggles with dense image content (exact values should remain text).

Getting Started

npx pxpipe-proxy
# proxy on 127.0.0.1:47821
ANTHROPIC_BASE_URL=http://localhost:47821 claude

Open http://127.0.0.1:47821/ for a live dashboard showing tokens saved, per-session stats, and every text→image conversion side by side.

Ad

Key Results

  • Token reduction: Dense content compresses ~10x (25k text → 2.7k image tokens)
  • Cost savings: 59–70% lower bill on typical Claude Code traffic, 72–74% on compressed requests
  • Accuracy: Fable 5 model reads images at 100/100 on clean eval; Opus 4.8 is lossy for exact values
  • Demo comparison: Session totals: plain $42.21 (context 96% full) vs pxpipe $6.06 (context 7.4% full)

Limitations

Spare or small requests won't benefit. Opus 4.8 cannot reliably read exact values from images (e.g., phrase counts). Single-reply format compliance has minor rough edges (one follow-up nudges may be needed).

Who It's For

Developers using Claude Code with large system prompts, extensive tool docs, or long conversation histories — especially in Fable 5 environments.

📖 Read the full source: HN AI Agents

Ad

👀 See Also

Netflix Releases VOID: Video Object and Interaction Deletion Model on Hugging Face
Tools

Netflix Releases VOID: Video Object and Interaction Deletion Model on Hugging Face

Netflix has released VOID, a video inpainting model that removes objects from videos along with all physical interactions they induce, including falling objects and displaced items. The model requires a GPU with 40GB+ VRAM and uses quadmask conditioning with two checkpoint files for different refinement levels.

OpenClawRadar
ANE Optimization Through Phone-Steered AI Experiments Shows Kernel Fusion Benefits
Tools

ANE Optimization Through Phone-Steered AI Experiments Shows Kernel Fusion Benefits

A developer ran 55 experiments on Apple Neural Engine optimization, steering the process from their phone using Claude for brainstorming. Key improvements included fusing 3 ANE kernels into 1 mega-kernel, reducing validation loss from 3.75 to 2.49 and step time from 176ms to 96ms.

OpenClawRadar
Claude Code Skill Converts Stitch Designs to Next.js with Zero Pixel Drift
Tools

Claude Code Skill Converts Stitch Designs to Next.js with Zero Pixel Drift

A Claude Code skill converts Google Stitch AI designs to Next.js components with mandatory verification checkpoints to prevent pixel drift, preserving exact values and handling assets.

OpenClawRadar
VidLens MCP Server: Persistent YouTube Knowledge Base for Claude
Tools

VidLens MCP Server: Persistent YouTube Knowledge Base for Claude

VidLens is a free, open-source MCP server that indexes YouTube content locally with semantic embeddings, treating videos as a persistent knowledge base rather than extracting temporary transcripts. It provides 41 tools across 10 modules for searching, analyzing, and retrieving video content.

OpenClawRadar