60% Fable cost cut by converting code to images and having the model OCR it

287 points · 92 comments on HN · read original →

Points and comments are a snapshot, not live.

pxpipe is a local proxy that cuts Fable 5 token costs ~60% by converting text to images.

pxpipe is a local proxy that intercepts Anthropic API requests and converts bulky text (system prompts, tool docs, history) into PNG images before sending them. Because image token cost is fixed by pixel dimensions, dense text like code or JSON achieves ~3.1 chars per image-token versus ~1 char per text-token. The tool reports 59-70% lower end-to-end bills on real Claude Code traffic. It is lossy: exact strings like hex IDs or hashes can be misread (13/15 correct on Fable 5, 0/15 on Opus). The proxy runs locally via `npx pxpipe-proxy` and works with Claude Code by setting `ANTHROPIC_BASE_URL`.

What commenters are saying

Commenters split into two camps: those who see this as a legit compression technique (citing DeepSeek's OCR paper and the fact that image tokens have fixed cost regardless of content) and those who call it a pricing loophole that burns compute. Several commenters emphasize the readme's own caveats: it is lossy, degrades exact recall, and may reduce accuracy for tasks requiring frontier capability. The LLM-generated prose of the readme drew criticism for being verbose and hard to parse.