If you're a developer using AI APIs, you're probably overpaying — and you probably don't even know how much.
I built ai-model-cost, a free open-source CLI that compares pricing across all major AI providers (OpenAI, DeepSeek, Anthropic, Google, etc.) right from your terminal.
Why I built it
I was migrating our app from OpenAI to DeepSeek and kept bouncing between pricing pages. Each provider has different rates for input/output, different tiers, volume discounts — it's a mess. So I wrote a tool that does the math for you.
The cost gap is real
Here's what I found comparing 100M tokens/month (60/40 input/output split):
| Provider | Model | Monthly Cost |
|---|---|---|
| DeepSeek (official) | V4 Flash | ~$10 |
| ModelHub (reseller) | V4 Flash | ~$21 |
| Gemini 2.0 Flash | ~$22 | |
| OpenAI | GPT-4o mini | ~$33 |
| Anthropic | Claude Haiku 3.5 | ~$85 |
| OpenAI | GPT-5.5 | ~$910 |
The most expensive vs cheapest: 93x difference.
How to use it
# Compare everything
npx ai-model-cost --tokens=100M --compare
# Check a specific model
npx ai-model-cost --model=deepseek-v4-flash
# Quick scan
npx ai-model-cost
What I learned
- DeepSeek V4 Flash is absurdly cheap — it's 93x cheaper than GPT-5.5 for similar quality
- OpenAI GPT-4o mini is the best value within OpenAI's lineup — 27x cheaper than GPT-5.5, same quality tier
- Claude is consistently the most expensive — great for complex reasoning, overkill for basic tasks
- Most developers should run this tool before committing to a provider
What's next
I'm planning to add:
- Token estimation based on your actual usage (import from OpenAI/ModelHub billing)
- Latency benchmarks alongside cost
- Weekly price update notifications
Get it
npx ai-model-cost --compare
Or check the code on GitHub. PRs welcome.
Note: I run ModelHub which is one of the providers in the comparison. The tool is unbiased — it shows all providers sorted by price, including ones I don't operate.
Top comments (0)