Modern Creator
Nick Saraev · YouTube

Reduce Claude Code API Costs by 30% in 5 Minutes (Image-Token Arbitrage)

A creator shows a live head-to-head test proving that rendering bulky Claude Code context as a compressed image, instead of raw text, cuts the bill by 30-59% with zero loss in recall.

Posted
today
Duration
Format
Tutorial
educational
Views
554
54 likes
Big Idea

The argument in one line.

Because Claude bills images by pixel dimensions rather than by the text packed inside them, converting bulky Claude Code context into small, dense-text PNGs before sending it can cut real API costs by 30-59% with no loss in the model's ability to recall the content.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You run Claude Code (or a similar LLM coding agent) against large recurring prompts — long system prompts, tool documentation, or session history that gets resent constantly.
  • You operate an AI-heavy business function where the same expensive context gets fed into the model over and over, so a fixed percentage savings compounds into real monthly cost.
  • You're comfortable running a local script or proxy in front of your coding agent and are willing to experiment with a technique that depends on current, possibly-temporary provider billing rules.
SKIP IF…
  • You run only small, one-off Claude Code queries where token costs are already negligible.
  • You need guaranteed long-term stability from your tooling — this technique exploits a billing quirk the provider could patch at any time.
TL;DR

The full version, fast.

Anthropic bills image inputs by fixed pixel dimensions, not by how much text is packed into the image, while it bills text inputs by token count. That mismatch means dense text (code, JSON, tool output, long system prompts) can be rendered as a small, still-legible PNG and read by Claude's vision/OCR pipeline for a fraction of the token cost of sending the same content as raw text. The creator shows a live comparison where an identical prompt cost $1.03 as text versus $0.69 as an image, a 30% reduction, then builds a small local pipeline (using the open-source pxpipe proxy) in about five minutes via one voice-dictated Claude Code prompt. On a second, larger knowledge-retrieval test using a mega-prompt of accumulated video performance data, the technique cut input tokens by 68.7% and total cost by 59%, with no observed drop in the model's ability to answer questions about the content. The gain is largest for knowledge-lookup tasks over dense reference material, and the creator flags that this is a live billing quirk that could be patched by the provider at any time.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:0001:10

01 · Claude billing glitch

Creator states the hack: render bulky Claude Code context as images instead of text to exploit fixed per-pixel image billing versus per-token text billing, with no loss of context.

01:1002:14

02 · Proof: $1.03 text vs $0.69 image

Live terminal comparison of an identical prompt sent as text ($1.03, 59,822 tokens) versus as an image (69 cents, 38,142 tokens) — a 30%+ reduction with zero difference in recall.

02:1403:48

03 · Building the pipeline (one voice prompt)

Creator dictates a single instruction via a local voice-to-text tool (Hex, running on Parakeet) to a coding agent, feeds in the pxpipe GitHub repo, and has the agent build a script that converts any prompt file into an image before sending it to Claude.

03:4804:37

04 · Why the image arbitrage math works

Explanation of the underlying economics: a fixed-resolution image costs a set number of vision tokens and holds a large number of characters, while real Claude Code text traffic averages far fewer characters per token — making the image route cheaper as long as the picture stays legible.

04:3705:45

05 · The finished script + a mega-prompt demo

With the script (pxpipe.py) built, the creator loads a massive prompt containing performance data from every video they've ever uploaded, generates both a text and an image version, and prepares a head-to-head test.

05:4506:26

06 · Head-to-head results: 68.7% fewer tokens

Running the same knowledge-retrieval questions against both versions shows a 68.7% reduction in input tokens and a 59% reduction in total cost — higher than the earlier 30% example because this was a dense knowledge-lookup task.

06:2606:44

07 · Get the script (free download) + sign-off

Creator makes the script freely available, notes the billing gap will likely be patched soon so viewers should use it while it lasts, and plugs his accountability program.

Atomic Insights

Lines worth screenshotting.

  • Anthropic prices image inputs by fixed pixel dimensions, not by how much text is packed inside them, while text inputs are priced by token count.
  • Rendering bulky context (system prompts, tool docs, history) as a small PNG instead of raw text can cut real Claude Code costs by 30-59% with the same underlying information delivered.
  • In a live side-by-side test, an identical prompt cost $1.03 as text versus $0.69 rendered as an image, a 30% reduction.
  • The test prompt used 59,822 text tokens versus only 38,142 when the same content was sent as a compressed image.
  • On a larger knowledge-retrieval test over a mega-prompt of accumulated data, input tokens dropped 68.7% and total cost dropped 59% when the prompt was sent as an image instead of text.
  • Dense content like code, JSON, and tool output packs roughly 3.1 characters per image-token, versus roughly 1 character per text-token on typical Claude Code traffic.
  • Text inside the compressed image can be shrunk far below normal readable size and still be recovered with zero loss in recall, because current OCR/vision recognition in the model is strong enough to read very small compressed text.
  • The technique's advantage scales with how 'knowledge-lookup' the task is: needle-in-haystack retrieval over dense reference text shows a larger cost delta than tasks requiring heavy step-by-step reasoning.
  • The entire pipeline (a local proxy/script that converts a prompt file into an image before feeding it to the model) was built in about five minutes using a single voice-dictated instruction to a coding agent.
  • This savings depends on a specific, current gap in how one provider prices image versus text tokens, and the creator explicitly expects it to get patched quickly.
  • The technique is best suited to large, recurring, business-critical prompts (hundreds of thousands of tokens, reused constantly) rather than small one-off queries, where the setup overhead isn't worth it.
Takeaway

A billing quirk lets you pay less for the same context.

WHAT TO LEARN

Because image inputs are billed by pixel size rather than content density, rendering bulky, frequently-reused context as a small legible image instead of raw text can cut real API costs by 30-59% with no loss in the model's ability to use that information.

  • Image token cost is fixed by resolution, not by how much text is packed inside — a small PNG with dense, tiny (but legible) text can hold far more information per token than raw text does.
  • A live head-to-head test showed identical context costing $1.03 as text versus $0.69 as an image, a savings of roughly 30%, confirmed by the actual token counts (59,822 vs 38,142).
  • On a larger knowledge-retrieval task over a big reference prompt, the same technique produced a 68.7% cut in input tokens and a 59% cut in total cost — bigger gains than the smaller first example.
  • The savings are largest for knowledge-lookup and retrieval-style tasks over dense reference material, and smaller for tasks that require heavy iterative reasoning rather than lookup.
  • This kind of arbitrage only exists because of a specific, current provider billing rule — it is not a durable architectural advantage, and providers routinely close these gaps once they're publicized.
  • The setup cost to capture this savings is low (a small local script), which only makes sense to build when the underlying prompt is large and reused often enough that a percentage savings adds up to real money.
Glossary

Terms worth knowing.

Image-token billing
A pricing model where the cost of an image input to an AI model is determined by its pixel dimensions, regardless of how much text or detail is visually packed into it.
Token
The basic unit an AI model is billed on; text is broken into tokens by character/word patterns, while an image is converted into a fixed number of tokens based on its resolution.
OCR (optical character recognition)
The process by which a vision-capable model reads and extracts text from an image, allowing it to recover written content that was never sent as raw text.
Context
The full set of information (system prompt, tool documentation, conversation history, reference data) sent to an AI model alongside a request so it has what it needs to respond accurately.
Token arbitrage
Exploiting a mismatch between how two input formats (here, text vs. image) are priced by a provider to get the same informational content delivered for a lower total cost.
Resources

Things they pointed at.

00:17toolpxpipe (GitHub repo)
02:45toolHex (voice-to-text, runs on Parakeet, local/open-source)
01:36toolGhostty (terminal)
Quotables

Lines you could clip.

01:43
The text version of this prompt cost $1.03, whereas the images version of the prompt cost 69 cents.
concrete before/after dollar proof, no setup neededTikTok hook↗ Tweet quote
06:05
There's a 68.7% reduction in input tokens... it's actually 59% [cost reduction].
bigger number than the headline claim, strong payoff statIG reel cold open↗ Tweet quote
04:39
They're probably gonna patch this pretty quick. So if you guys have any business info that you wanna save... make sure to do this now.
urgency/scarcity framing that drives immediate actionnewsletter pull-quote↗ Tweet quote
The Script

Word for word.

Read-along

Don't just watch it. Burn it in.

See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

00:00Got a really fun Fable usage optimization hack. It takes like thirty seconds and it saves approximately 30% of all Fable usage with next to no downsides. Check this out.
00:08So I'm gonna include this down below. You guys can download this and use this in one click. But to make a long story short, this allows you to cut Claude codes input tokens by rendering bulky context as images.
00:19You get the exact same system prompt, tool docs, and history. It's just you get it in a fraction of the tokens.
00:25And it's because of the way that Claude currently does image based billing versus token based billing. You know, an images token cost is fixed by its pixel dimensions, not how much text is inside of it.
00:36Which means, if you're sneaky, you can make the text in the image super, super small. Obviously, it still needs to be legible, but super, super small. And then you can have Claude render that, bill you a significantly reduced amount, but get all of the context that you otherwise would have for, as mentioned, 30% off.
00:54And so, you know, am I gonna use this on every single query that I'm running? Probably not. But if I have really massive queries that are hundreds of thousands of tokens and I'm expecting these to run for a long time to to be recycled constantly and used pretty constantly for a business function, is this a quick and easy way you can immediately save 30%.
01:10Okay. So I just have Claude Fable five open in a terminal here called ghost t t y. This is the exact same thing that you guys can get in Claude desktop or if you're using anti gravity or whatever.
01:20I was just experimenting with ghost t t y because I like the way that it looks. And as you guys see here, I ran a test across the text version of this prompt and then the image version of this prompt. And the text version of this prompt cost $1.03, whereas the images version of the prompt cost 69¢.
01:38Mathematically, that's a little over a 30% reduction in token usage. The important part here was we used instead of 59,822 CashRite tokens, only 38,142.
01:51And there was zero difference in the model's ability to recall various components of the text, which I know sounds crazy considering this is now a super crazy small compressed image. But the OCR, the optical character recognition, and like Fable's ability to understand text even if it's really tiny, um, is essentially probably the best in the world right now.
02:11And as long as it converts that into tokens, it's the same thing. Okay. So how do you actually implement something like this for yourself?
02:17Really easy. I'm just gonna clear this demo and I'm going to speak into my Clogcode terminal. Uh, I'm using a free open source voice to text system called Hex.
02:27It runs on Parakeet. It's all entirely local to my computer. So what I'm gonna do is I'm gonna tap the voice transcript button and I'm just gonna ask it what I want in a really simple way.
02:35Hey, there's a new token reduction strategy available. I've detailed it in the below GitHub repo. What I want you to do is I want you to build a simple system that every time I feed in a prompt, converts it to an image first, presumably using a cheaper model, and then takes that and then feeds that into Fable.
02:53And we're gonna be building it in Fable right now. That's just to build the architecture. After this, I want to be able to pass off extremely long prompts to Fable in order to arbitrage on tokens.
03:03K. So I'm gonna then feed in this actual repo. Let's just go back here, p x pipe, and then I'm going to paste this in.
03:09And the whole idea is, you know, obviously, I'm gonna have Fable itself do this. And it's gonna be doing this with pretty high effort because I wanted to build a really efficient system.
03:18Um, but afterwards, you know, I want to be able to take in whatever super long prompt I have, and then just one shot convert this to an image using a skill. So, you know, you can imagine a future instance where I'm building some business infrastructure. That business infrastructure relies on some sort of crazy long prompt that, I don't know, details every possible conversation route or whatever the heck it is that you're doing.
03:37I I I just wanna be able to one shot that massive prompt into an image using this skill. So it's going through the repo right now. It's summarizing it.
03:45We'll loop back, and I'll show you the results in a sec. Now rather than feeding in prompts directly, what we're gonna do is we're gonna basically have Fable build a brief little pipeline, some sort of script, and then I'm just going to store the prompts that I want it to run-in a file. It'll then run the script on the file, generate an image, and in that way, this pipeline will significantly reduce total token consumption.
04:06As you can see here, the logic is pretty straightforward. A nineteen twenty eight by nineteen twenty eight image costs approximately this many vision tokens and holds that many characters. Whereas real Cloud Code traffic averages that many characters a token.
04:18That's how you make imaging profitable. We're basically just arbitraging the cost of an image right now versus the cost of tokens. And as mentioned, they're probably gonna patch this pretty quick.
04:27So if you guys have any business info that you wanna save, presumably a few $100 on, lord knows I'm feeding in every single one of my prompts like this for the foreseeable future, um, then make sure to do this now. Alright.
04:38And now we have the script, p x pipe dot p y. So I'm gonna just come up with a really long prompt, and then I'm going to show you guys how to use it in practice. Okay.
04:46So I just created a super mega long prompt. As you guys could see here, it's massive. I've stored every single video that I've basically ever uploaded into a giant text file along with some of their performances.
04:57And now I'm just gonna ask it a bunch of questions about this and just use this knowledge essentially to significantly improve the probability of, you know, I don't know, minimizing churn reduction strat, something like that. At the same time, I've also created images. These images are very similar to that prompt.
05:12It's just instead of being arrayed in text, it is arrayed in an image. So, I mean, like, you can zoom way in here. You can see it's kind of, like, compressed and stuff like that.
05:19But the idea is it's still legible, which is the important point. I could probably optimize this far more by, like, justifying the text and stuff like that. But just as a demo, I'm gonna run it.
05:28And now we're just gonna run a quick test, and the test is going to ask a bunch of questions about content inside of this. Like, hey, you know, um, what are the strategies that work really well?
05:37What did you find, like, member four two eight nine do that other members didn't whatever. And then we're just gonna test the two and then see how much better this is as a token optimization technique. Okay.
05:46What it's doing now is it's actually running the head to head test. And it's doing so by passing this through Fable five using API pricing, which we might all have to be using in twenty four hours anyway. Now because this was a knowledge based task, we're literally like isolated extracting components from this text, combining them and and so on and so forth, more than just re reasoning over and over and over again on this, there's a massive delta.
06:07There's a 68.7% reduction in input tokens.
06:11With all that in mind, the cost didn't decrease by 25 to 30 percent like I showed you before in the example. It's actually 59%, which means if you have the sort of needle in a haystack type queries, obviously, you have significantly higher quality or rather larger alpha in using a strategy like this.
06:26Anyway, to make your lives super easy, I've included this down below. Do whatever the heck you want with it. Anyway, this announcement doesn't really need to be more in-depth than that.
06:33Hopefully, you guys appreciated the video. Have a lovely rest of the day. And if you guys wanna get that, again, just check down below in the description.
06:38Check out Maker School, my ninety day accountability program, where guarantee your first customer selling systems like this. Catch you all tomorrow.
The Hook

The bait, then the rug-pull.

A creator claims a thirty-second trick can cut Claude Code API bills by 30% with almost no downside — then proves it live, running the identical prompt as text and as a compressed image and showing the real invoice difference on screen.

Frameworks

Named ideas worth stealing.

03:48concept

Image-vs-text token arbitrage

  1. Image cost is fixed by pixel dimensions
  2. Text cost scales with token count
  3. Dense content packs more characters per image-token than per text-token
  4. Render bulky, reused context as a small legible PNG instead of raw text

A billing-quirk exploit: because Claude prices images by resolution rather than content density, packing dense text (code, JSON, docs) into a small image and letting the model's vision/OCR pipeline read it back can cost meaningfully less than sending the same content as tokenized text.

Steal forany recurring, high-volume Claude Code workflow that resends the same large context (system prompts, tool docs, reference data) on every call
CTA Breakdown

How they asked for the click.

Frame Gallery

Visual moments.

Chat about this