Stop Leaking
Vision Tokens.
The ultimate LLM-native image optimization middleware. It mathematically snaps your images to Claude, GPT, and Gemini's exact internal grid boundaries to slash token usage by up to 90% without losing visual detail.
cargo run -- data/image.jpg --model gpt4o
// Squeezer simulating OpenAI's short-side algorithm...
Input: 4096ร3072 (2.2 MB)
Output: 4095ร2048 (1.2 MB)
Tokens Saved: 5,595 (33.3% cheaper)
The Math Behind the Magic
Claude (Area-Based)
Claude bills strictly by pixel area (W ร H / 750). Every pixel of padding costs you. Squeezer aggressively crops solid borders, shaving thousands of tokens instantly.
GPT-4o (Tiling System)
OpenAI forcefully scales the shortest side to 768px, then tiles it. Squeezer simulates this backwards to snap your image right under the exact 512px tile threshold.
Gemini (Massive Tiles)
Gemini uses huge 768ร768 blocks. A slightly overlapping image costs you double. We snap images securely down to the nearest tile boundary.
Think in Code (Sandbox)
Let your agent execute custom crops, binarization, or filters locally. Extract only the context you need to save up to 99.9% tokens.
Persistent Analytics
Locally tracks every optimization in a SQLite database. View your cumulative USD savings directly from your terminal or AI agent.
Universal MCP
Works natively with Claude Code, Cursor, Zed, and VS Code. No complex setup, just plug it into your favorite AI tool.
Wait, what about GPT-5?
GPT-5 handles up to 10.24 Megapixels natively (with a hard cap of 1536 tokens). Because of these massive architectural limits, grid-tiling optimization is rarely needed. However, Squeezer still processes GPT-5 images to strip heavy padding and compress file sizes (from MBs to KBs) for much faster API uploads and drastically reduced latency.
Interactive Savings Calculator
Optimizing a standard 2400x1670 screenshot. Target: Agnostic.
Tokens Saved (Claude)
Tokens Saved (GPT-4o)
File Size Reduced
--
Universal MCP Integration
Select your agent or editor below. Thanks to npx -y, zero global installation is required! Just paste the configuration.
claude mcp add vision-squeezer -- npx -y vision-squeezer
Crawler Integration
Automate token optimization for high-scale web scraping. Integrate with your favorite crawlers via post-processing or request interception.
Firecrawl / Crawl4AI
Post-process screenshots before sending to LLM. Use our CLI bridge to "squeeze" images in your pipeline.
// Execute CLI as a bridge
const { execSync } = require('child_process');
const output = execSync('vision-squeezer screenshot.png --output opt.jpg');
console.log(output.toString());
Playwright Interceptor
Intercept all outgoing image requests during crawl and optimize them on-the-fly using VisionSqueezer.
await page.route('**/*.{png,jpg}', async (route) => {
const response = await route.fetch();
const body = await response.body();
const optimized = await squeeze(body);
route.fulfill({ body: optimized });
});