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

github.com
July 3, 2026
11 min read
🔥🔥🔥🔥🔥
62/100
Summary
pxpipe reduces Claude Code's input token usage by converting bulky text context into images, significantly lowering token consumption. The system leverages the fixed token cost of images based on pixel dimensions, allowing dense content to utilize approximately 3.1 characters per image-token compared to 1 character per text-token.
Key Takeaways
- pxpipe reduces input token usage by converting bulky text context into images, achieving approximately 59-74% lower costs on token-dense requests.
- The system allows for significant compression of system prompts and tool documentation, with an example showing a reduction from approximately 25,000 text tokens to about 2,700 image tokens.
- The performance of pxpipe is workload-dependent, providing savings primarily on dense content while leaving smaller requests unaffected.
- The tool operates as a local proxy, allowing users to monitor token savings and session statistics through a live dashboard.
Coverage & discussions
Hacker News · github.com
Community discussions
Hacker News discussion ↗
Historical count: 5 · 5 saved in sample · Historical sample
Analysis ready
Community Sentiment
Positives
- Encoding information as optical tokens is way more efficient than text, which could revolutionize how we handle data in AI models.
- DeepSeek's compression improvement using visual tokens shows there's a lot of unexplored potential in this approach, sparking excitement about future AI capabilities.
- Using images as input has led to effective workflows for some users, highlighting that there's more than one way to interact with AI tools.
Concerns
- This pricing hack feels like it could burn resources, and once the loophole is closed, costs for OCR may skyrocket.
- There's a lot of confusion about whether this is truly OCR, which raises concerns about the terminology and understanding of what the model is doing.
- Some commenters worry that the current method may just be a temporary fix, and the underlying inefficiencies could resurface when the loophole is addressed.




