메뉴
BL
The Decoder 24일 전

텍스트를 이미지로 변환해 토큰 비용 70% 절감하는 오픈소스 'pxpipe'

IMP
8/10
핵심 요약

오픈소스 도구인 pxpipe는 긴 텍스트를 압축된 PNG 이미지로 변환하여 클로드 코드(Claude Code) 등 AI 코딩 에이전트의 토큰 비용을 최대 70%까지 절감합니다. 이는 AI 모델이 이미지를 처리할 때 고정된 토큰 수를 부과하는 가격 정책의 허점을 노린 것입니다. 비용 효율성은 매우 뛰어나지만, 처리 속도 저하 및 텍스트 인식 정확도(OCR 오류 등)가 떨어질 수 있다는 단점도 동반합니다.

번역된 본문

오픈소스 도구 pxpipe는 클로드 코드(Claude Code)에 입력되는 긴 텍스트를 간결한 PNG 이미지로 변환하여 토큰 비용을 절감해 줍니다. 이 방법은 앤스로픽(Anthropic)의 이미지 과금 방식을 활용한 것입니다. 텍스트는 문자당 약 1토큰의 비용이 들지만, 이미지는 내용의 양과 상관없이 픽셀 크기를 기준으로 고정된 수의 토큰이 부과됩니다. 코드나 JSON 같은 복잡한 내용을 이미지로 렌더링하면, 하나의 이미지 토큰당 약 3.1개의 문자를 담아낼 수 있습니다.

pxpipe는 이를 로컬 프록시(local proxy) 형태로 실제 구동합니다. 클로드 코드로 향하는 요청을 가로채서 시스템 프롬프트, 도구 문서, 이전 대화 기록과 같이 용량이 크고 정적인 부분들을 이미지로 렌더링합니다. 최근 메시지와 모델 출력은 일반 텍스트로 그대로 전달됩니다. 하단의 이미지는 모델이 실제로 보게 되는 내용을 보여줍니다. 약 48,000자에 달하는 시스템 프롬프트와 도구 문서가 빽빽하게 압축된 단일 PNG 페이지 하나로 들어갑니다. 텍스트로 처리하면 약 25,000 토큰의 비용이 발생하지만, 이미지로 처리하면 대략 2,700 토큰에 불과합니다.

개발자 스티븐 청(Steven Chong)에 따르면, 전체 비용은 평균 59~70% 절감됩니다. 한 페이블 5(Fable 5) 데모에서는 세션당 비용이 42.21달러에서 6.06달러로 급감했습니다. 만약 이 다소 특이한 기법이 널리 퍼질 경우, AI 기업들이 이미지 처리 가격을 인상하는 방식으로 대응할 수도 있습니다.

정확도와 속도 면에서는 손해를 봅니다 이 접근 방식에는 단점도 존재합니다. 손실 압축(lossy)이 발생하여 해시(hash) 값과 같은 정확한 문자열은 이미지에서 읽어올 때 깨져 보일 수 있습니다. 또한 모델이 텍스트를 직접 읽는 대신 렌더링된 이미지를 비전 인코더(vision encoder)로 처리해야 하므로 처리 속도가 느려집니다. 기본적으로 pxpipe는 페 이블 5(Fable 5)와 GPT 5.6을 지원합니다. 벤치마크와 평가 결과는 해당 저장소(repository)에 문서화되어 있습니다. 페 이블 5는 모델가 외우지 못했을 새로운 난수를 사용한 수학 문제 벤치마크에서 100%의 정확도를 기록했습니다. 스티븐 청에 따르면 오퍼스(Opus) 4.7 및 4.8은 렌더링된 이미지의 약 7%를 잘못 읽어내며, GPT 5.5 역시 이미지 문맥을 다룰 때 성능이 저하됩니다. 두 모델은 기본적으로 비활성화되어 있으며 수동으로만 활성화할 수 있습니다.

텍스트를 압축된 이미지 형태로 AI 모델에 입력하는 아이디어 자체는 새로운 것이 아닙니다. 딥시크(DeepSeek)는 텍스트 문서를 이미지로 처리하는 OCR 시스템을 구축했으며, 기술 논문에 따르면 정보의 97%를 유지하면서도 압축률을 최대 10배까지 높였습니다.

출처: 깃허브(Github)

원문 보기
원문 보기 (영어)
Open-source tool pxpipe hides text in PNGs to cut Claude Code and Fable 5 token costs up to 70% Matthias Bastian View the LinkedIn Profile of Matthias Bastian Jul 4, 2026 Steven Chong Ask about this article… Search The open-source tool pxpipe converts long text inputs for Claude Code into compact PNGs to cut token costs. 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. pxpipe puts this into practice as a local proxy. It intercepts requests to Claude Code and renders the bulky, static parts as images, including system prompts, tool documentation, and older chat history. Recent messages and model outputs pass through as normal text. The image below shows what the model actually sees: Around 48,000 characters of system prompt and tool documentation get squeezed onto a single densely packed PNG page. As text, that would cost about 25,000 tokens. As an image, it's roughly 2,700. Ad According to developer Steven Chong , total savings average 59 to 70 percent. In one Fable 5 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. Ad DEC_D_Incontent-1 The tradeoff is accuracy and speed The approach has downsides. It's lossy and exact strings like hashes can come back garbled when read from images. Processing is also slower since the model has to run the rendered images through a vision encoder instead of reading text directly. By default, pxpipe supports Claude Fable 5 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 can't have memorized. According to Chong, Opus 4.7 and 4.8 misread about 7 percent of the rendered images, and GPT 5.5 also does worse with image context. Both models are off by default and can only be enabled manually. Ad Feeding text to AI models as compressed images isn't a new idea. 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. Ad DEC_D_Incontent-2 AI News Without the Hype – Curated by Humans Subscribe to THE DECODER for ad-free reading, a weekly AI newsletter, our exclusive "AI Radar" frontier report six times a year, full archive access, and access to our comment section. Subscribe now Source: Github