Summary
The Fable 5 "Context as Image" Hack: Cut Input Tokens ~30–60%
Nick Saraev demos a token-cost hack for Claude Code / Fable 5: render bulky context (system prompt, tool docs, history, long knowledge files) as a single tiny-but-legible image instead of text. Because image billing is fixed by pixel dimensions — not by how much text is inside — a 1928×1928 image can carry far more characters per token than plain text, cutting input-token cost roughly 30% on general prompts and up to about 59% on large "needle-in-a-haystack" retrieval queries, with no measured loss in recall. He's candid that it exploits current image-vs-token pricing and will likely be patched.
"NEW Fable 5 API Usage Exploit (Reduce Costs Immediately)" by Nick Saraev — Watch on YouTube →
An image's token cost is fixed by its pixel dimensions, not by the amount of text rendered inside it. Shrink legible text into a fixed-size image and you pay a flat vision-token cost no matter how many characters it holds — and Fable's OCR is strong enough to read very small text, so legibility (not size) is the only real limit.
Key Takeaways
- Image billing is fixed by pixel dimensions, not text volume. That's the whole arbitrage: the same context costs less when it arrives as a compact image than as tokens of text.
- Measured result on a general prompt: $1.03 as text dropped to $0.69 as an image — about 33% off (59,822 → 38,142 cached tokens) with zero difference in the model's ability to recall the text.
- Measured result on a large retrieval task: input tokens fell 68.7% and cost fell ~59%. The bigger and more retrieval-heavy the prompt, the larger the saving.
- The math: a 1928×1928 image costs a fixed number of vision tokens and holds a set character count; compare that against Claude Code's average characters-per-token to see when the image wins.
- Best for massive, long-lived, frequently-recycled prompts (hundreds of thousands of tokens powering a business function) — not worth it for short everyday queries.
- Legibility is the only constraint. You can optimize the layout further (e.g. justifying text) for more savings, as long as the OCR can still read it.
- Caveat: this arbitrages current image-vs-token pricing and will probably be patched; it also assumes you're on API pricing. Treat it as a temporary optimization, not a permanent architecture.
How He Built It
Rather than feeding prompts directly, he had Fable build a small pipeline (a script he calls pxpipe.py): store your prompts in a file, run the script to render them into a fixed-size image, then feed the image to Fable. He described the goal to Fable by voice using Hex (a free local voice-to-text tool running on Parakeet) inside a Ghostty terminal, then pasted in the reference repo for the technique. The pipeline is the reusable part — a skill that one-shots any long prompt file into an image before it hits the model.
Tools & Scripts Mentioned
pxpipe.py — generated pipeline: prompts file -> rendered image -> Fable
Hex — free, fully-local voice-to-text (runs on Parakeet)
Ghostty — terminal used for the demo (any Claude Code terminal works)





