{"id":62089,"date":"2026-07-04T20:57:03","date_gmt":"2026-07-05T00:57:03","guid":{"rendered":"https:\/\/overcentral.com\/en\/?p=62089"},"modified":"2026-07-04T20:57:03","modified_gmt":"2026-07-05T00:57:03","slug":"pxpipe-claude-code-token-costs","status":"publish","type":"post","link":"https:\/\/overcentral.com\/en\/pxpipe-claude-code-token-costs\/","title":{"rendered":"pxpipe Slashes Claude Code and Fable 5 Token Costs 70%"},"content":{"rendered":"<p>The open-source tool <strong><a href=\"https:\/\/github.com\/StevenChong\/pxpipe\" target=\"_blank\" rel=\"noopener noreferrer\" data-iacss-external=\"1\">pxpipe<\/a><\/strong> converts long text inputs for <a href=\"https:\/\/overcentral.com\/en\/anthropic-claude-code-artifacts\/\" title=\"Anthropic Launches Live Claude Code Artifacts for Enterprise Teams\" data-iacss-internal=\"1\">Claude Code<\/a> into compact PNGs, cutting token costs by up to 70 percent. The trick works because of how Anthropic prices images. Text costs roughly one token per character, but images cost a fixed number of tokens based on their pixel dimensions, no matter how much text they contain. Render dense content like code or JSON as an image, and you can pack about 3.1 characters into every image token.<\/p>\n<h2>How pxpipe Saves 70% on Token Costs<\/h2>\n<p>pxpipe puts this pricing loophole into practice as a local proxy. It intercepts requests to Claude Code and renders the bulky, static parts of a conversation as images \u2014 including system prompts, tool documentation, and older chat history. Recent messages and model outputs pass through as normal text. The model sees a single densely packed PNG page where roughly 48,000 characters of system prompt and tool documentation get squeezed together. As text, that would cost about 25,000 tokens. As an image, it is roughly 2,700 tokens.<\/p>\n<p>According to developer Steven Chong, total savings average 59 to 70 percent. In one <a href=\"https:\/\/overcentral.com\/en\/anthropic-restores-fable-5-export-controls\/\" title=\"Anthropic restores Fable 5 after export control lift\" data-iacss-internal=\"1\">Fable 5<\/a> demo, session costs dropped from $42.21 to $6.06. If this somewhat exotic trick catches on, AI companies could respond by raising image processing prices.<\/p>\n<h3>What Is pxpipe and How Does It Reduce Token Costs?<\/h3>\n<p>pxpipe is a local proxy that intercepts API requests to Claude Code and converts static text content \u2014 such as system prompts, tool documentation, and older chat history \u2014 into PNG images before sending them to the model. Because Anthropic prices images based on pixel dimensions rather than character count, rendering dense text as an image packs roughly 3.1 characters per token compared to one character per token for plain text, reducing total token usage by 59 to 70 percent.<\/p>\n<h2>The Tradeoff: Accuracy and Speed<\/h2>\n<p>The approach has clear downsides. It is lossy \u2014 exact strings like hashes can come back garbled when read from images. Processing is also slower because the model must run the rendered images through a vision encoder instead of reading text directly.<\/p>\n<p>By default, pxpipe supports <a href=\"https:\/\/overcentral.com\/en\/anthropic-restores-claude-fable-5-access\/\" title=\"Anthropic Restores Claude Fable 5 Access on Wednesday\" data-iacss-internal=\"1\">Claude Fable 5<\/a> and GPT 5.6. Benchmarks and evaluations are documented in the repository. Fable 5 hits 100 percent accuracy in benchmarks on math problems with fresh random numbers the model cannot have memorized. According to Chong, Opus 4.7 and 4.8 misread about 7 percent of the rendered images, and GPT 5.5 also performs worse with image context. Both models are off by default and can only be enabled manually.<\/p>\n<h2>Broader Context: Image-Based Text Compression Is Not New<\/h2>\n<p>Feeding text to AI models as compressed images is a known technique. DeepSeek built an OCR system that processes text documents as images and, according to its technical paper, compresses them by up to a factor of ten while keeping 97 percent of the information. pxpipe applies a similar principle to interactive coding sessions, where reducing token consumption has an immediate and measurable impact on cost.<\/p>\n<h2>Who Should Try This Now<\/h2>\n<p>For developers using Claude Code or compatible models on cost-sensitive projects \u2014 particularly those with long system prompts, extensive tool documentation, or lengthy chat histories \u2014 pxpipe offers a practical way to reduce spending without changing workflows. The tool is open source and available now on GitHub. Be prepared for slower processing on image-rendered content and verify that your target model handles image context reliably before committing to the approach. Given that AI companies may adjust image pricing in response to such workarounds, the savings window may not remain open indefinitely.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The open-source tool pxpipe converts long text inputs for Claude Code into compact PNGs, cutting token costs by up to 70 percent. The trick works because of how Anthropic prices images. Text costs roughly one token per character, but images cost a fixed number of tokens based on their pixel dimensions, no matter how much [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":90568,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/62089.png","fifu_image_alt":"pxpipe Slashes Claude Code and Fable 5 Token Costs 70%","footnotes":""},"categories":[349],"tags":[],"class_list":["post-62089","post","type-post","status-publish","format-standard","has-post-thumbnail","category-articles"],"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/62089.png","fifu_image_alt":"pxpipe Slashes Claude Code and Fable 5 Token Costs 70%","_links":{"self":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/62089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/comments?post=62089"}],"version-history":[{"count":0,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/62089\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media\/90568"}],"wp:attachment":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media?parent=62089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/categories?post=62089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/tags?post=62089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}