HomeVideos

NEW Fable 5 API Usage Exploit (Reduce Costs Immediately)

Now Playing

NEW Fable 5 API Usage Exploit (Reduce Costs Immediately)

Transcript

217 segments

0:00

Got a really fun Fable usage

0:01

optimization hack. Takes like 30 seconds

0:03

and it saves approximately 30% of all

0:05

Fable usage with next to no downsides.

0:07

Check this out. So, I'm going to include

0:09

this down below. You guys can download

0:10

this and use this in one click. But, to

0:12

make a long story short, this allows you

0:14

to cut Claude code's input tokens by

0:16

rendering bulky context as images. You

0:19

get the exact same system prompt, tool

0:21

docs, and history. It's just you get it

0:23

in a fraction of the tokens. And it's

0:25

because of the way that Claude currently

0:27

does image-based billing versus

0:29

token-based billing. You know, an

0:31

image's token cost is fixed by its pixel

0:33

dimensions, not how much text is inside

0:35

of it. Which means if you're sneaky, you

0:38

can make the text in the image super,

0:40

super small. Obviously, it still needs

0:42

to be legible, but super, super small.

0:44

And then you can have Claude render

0:45

that, bill you a significantly reduced

0:48

amount, but get all of the context that

0:50

you otherwise would have for, as

0:52

mentioned, 30% off. And so, you know, am

0:55

I going to use this on every single

0:56

query that I'm running? Probably not.

0:57

But, if I have really massive queries

0:59

that are hundreds of thousands of tokens

1:01

and I'm expecting these to run for a

1:03

long time, to to be recycled constantly

1:06

and used pretty constantly for a

1:07

business function, this is a quick and

1:09

easy way you can immediately save 30%.

1:10

Okay, so I just have Claude Fable 5 open

1:13

in a terminal here called Ghost TTY.

1:15

This is the exact same thing that you

1:17

guys can get in Claude Desktop or if

1:19

you're using Anti-Gravity or whatever. I

1:20

was just experimenting with Ghost TTY

1:22

because I like the way that it looks.

1:24

And as you guys see here, I ran a test

1:26

across the text version of this prompt

1:29

and then the image version of this

1:30

prompt. And the text version of this

1:31

prompt cost $1.03,

1:34

whereas the images version of the prompt

1:36

cost $0.69.

1:37

Mathematically, that's a little over a

1:39

30% reduction in token usage. The

1:42

important part here was we used, instead

1:45

of 59,822

1:47

cash rate tokens, only 38,142.

1:51

And there was zero difference in the

1:53

model's ability to recall various

1:55

components of the text, which I know

1:57

sounds crazy considering this is now a

1:59

super crazy small compressed image, but

2:01

the OCR, the optical character

2:03

recognition, and like Fable's ability to

2:05

understand text even if it's really

2:07

tiny, um is essentially probably the

2:10

best in the world right now. And as long

2:11

as it converts that into tokens, it's

2:14

the same thing. Okay, so how do you

2:15

actually implement something like this

2:16

for yourself? Really easy. I'm just

2:18

going to clear this demo, and I'm going

2:20

to speak into my Claude code terminal.

2:23

Uh I'm using a free open-source

2:25

voice-to-text system called Hex. It runs

2:27

on Parakeet. It's all entirely local to

2:29

my computer. So, what I'm going to do is

2:30

I'm going to tap the voice transcript

2:32

button, and I'm just going to ask it

2:33

what I want in a really simple way. Hey,

2:35

there's a new token reduction strategy

2:36

available. I've detailed it in the below

2:39

GitHub repo. What I want you to do is I

2:41

want you to build a simple system that

2:43

every time I feed in a prompt, converts

2:46

it to an image first, presumably using a

2:48

cheaper model, and then takes that and

2:51

then feeds that into Fable. Uh we're

2:53

going to be building it in Fable right

2:54

now. That's just to build the

2:55

architecture. After this, I want to be

2:57

able to pass off extremely long prompts

3:01

to Fable in order to arbitrage on

3:03

tokens. Okay, so I'm going to then feed

3:04

in this actual repo. Let's just go back

3:06

here, pxpipe, and then I'm going to

3:08

paste this in.

3:09

And the whole idea is,

3:11

you know, obviously I'm going to have

3:12

Fable itself do this, and it's going to

3:14

be doing this with pretty high effort

3:15

cuz I wanted to build a really efficient

3:17

system. Um but afterwards, you know, I

3:19

want to be able to take in whatever

3:20

super long prompt I have, and then just

3:22

one-shot convert this to an image using

3:24

a skill. So, you know, you can imagine a

3:26

future instance where I'm building some

3:28

business infrastructure. That business

3:30

infrastructure relies on some sort of

3:31

crazy long prompt that, I don't know,

3:34

details every possible conversation

3:35

route or whatever the heck it is that

3:36

you're doing. Um I I I just want to be

3:38

able to one-shot that massive prompt

3:40

into an image using this skill. So, it's

3:43

going through the repo right now. It's

3:44

summarizing it. We'll loop back, and uh

3:46

I'll show you the results in a sec. Now,

3:48

rather than feeding in prompts directly,

3:50

what we're going to do is we're going to

3:51

basically have Fable build a brief

3:54

little pipeline, some sort of script,

3:55

and then I'm just going to store the

3:57

prompts that I wanted to run in a file.

3:59

It'll then run the script on the file,

4:01

generate an image, and in that way this

4:03

pipeline will significantly reduce total

4:05

token consumption. As you can see here,

4:07

the logic is pretty straightforward. A

4:09

1928 by 1928 image costs approximately

4:12

this many vision tokens and holds that

4:13

many characters. Whereas a real Claude

4:15

code traffic averages that many

4:17

characters a token. That's how you make

4:19

image and profitable. We're basically

4:20

just arbitraging the cost of an image

4:23

right now versus the cost of tokens. And

4:25

as mentioned, they're probably going to

4:26

patch this pretty quick. So if you guys

4:27

have any business infra that you want to

4:29

save, presumably a few hundred dollars

4:31

on, Lord knows I'm feeding in every

4:33

single one of my prompts like this for

4:34

foreseeable future,

4:36

then make sure to do this now. All

4:37

right, and now we have the script

4:39

pxpipe.py.

4:40

So I'm going to just come up with a

4:41

really long prompt, and then I'm going

4:43

to show you guys how to use it in

4:45

practice. Okay, so I just created a

4:47

super mega long prompt. As you guys can

4:49

see here, it's massive. I've stored

4:51

every single video that I've basically

4:53

ever uploaded into a giant text file

4:55

along with some of their performances.

4:57

And now I'm just going to ask it a bunch

4:59

of questions about this and just use

5:00

this knowledge essentially to

5:01

significantly improve the probability

5:03

of, you know, I don't know, minimizing

5:05

churn reduction strat, something like

5:06

that. At the same time, I've also

5:08

created images. These images are very

5:10

similar to that prompt. It's just

5:12

instead of being arrayed in text, it is

5:14

arrayed in an image. So I mean, like you

5:16

can zoom way in here. You can see it's

5:17

kind of like compressed and stuff like

5:19

that. The idea is it's still legible,

5:21

which is the important point. Um I could

5:23

probably optimize this far more by like

5:24

justifying the text and stuff like that.

5:26

But just as a demo, I'm going to run it.

5:28

And now we're just going to run a quick

5:29

test. And the test is going to ask a

5:30

bunch of questions about content inside

5:32

of this. Like, "Hey, you know, um what

5:34

are the strategies that work really

5:36

well? What did you find like member 4289

5:39

do that other members didn't?" Whatever.

5:41

And then we're just going to test the

5:42

two and then see how much better this is

5:44

as a token optimization technique. Okay,

5:46

what it's doing now is it's actually

5:47

running the head-to-head test, and it's

5:49

doing so by passing this through Fable 5

5:51

using API pricing, which we might all

5:53

have to be using in 24 hours anyway.

5:55

Now, because this was a knowledge-based

5:56

task where literally like isolated

5:58

extracting components from this text,

6:01

combining them, and and so on and so

6:02

forth, more than just re-reasoning over

6:04

and over and over again on this, there's

6:06

a massive delta. There's a 68.7%

6:09

reduction in input tokens. With all that

6:11

in mind, the cost didn't decrease by 25

6:13

to 30% like I showed you before in the

6:15

example. It's actually 59%,

6:17

which means if you have these sort of

6:19

needle in a haystack type queries,

6:21

obviously you have significantly higher

6:22

quality, or rather larger alpha in using

6:25

a strategy like this. Anyway, to make

6:26

your life super easy, I've included this

6:28

down below. Do whatever the heck you

6:29

want with it. Anyway, this announcement

6:30

doesn't really need to be more in-depth

6:32

than that. Hopefully you guys

6:33

appreciated the video. Have a lovely

6:34

rest of the day, and if you guys want to

6:36

get that, again, just check down below

6:37

in the description. Check out Maker

6:38

School, my 90-day accountability

6:39

program. We'll guarantee your first

6:41

customer selling systems like this.

6:42

Catch you all tomorrow.

Interactive Summary

This video introduces a clever token optimization hack for Fable and Claude that can reduce input token costs by approximately 30% to nearly 60%. By converting bulky text-based prompts into compressed, readable images, users can take advantage of fixed image-based billing instead of token-based billing. The creator demonstrates the implementation of a pipeline that automates this conversion and highlights significant cost savings, especially for massive, long-context queries.

Suggested questions

3 ready-made prompts