ModelPricing.xyz vs Tokencost
A fast, continuously updated web calculator, REST JSON API, and zero-dependency CLI for 2026 frontier models—requiring no Python package maintenance.
Key Difference: Includes verified 2026 rates for GPT-5, Claude 4.5 Sonnet, Gemini 3.1 Pro, Grok 4.7, and DeepSeek V4 with built-in prompt caching math.
| Capability | ModelPricing.xyz | Tokencost |
|---|---|---|
| Interactive Browser UI | Yes (Next.js 15) | Python library only |
| Public CORS JSON API | https://modelpricing.xyz/api/pricing.json | Local static JSON |
| 2026 Frontier Models | 23+ Active Models | Often lags behind releases |
| Embeddable Docs Widget & SVG Badges | Yes (Iframe + /api/badge) | No |
Frequently Asked Questions
Is there a CLI version of ModelPricing.xyz?
Yes! Run npx modelpricing --calc --cache=0.6 in any terminal with Node.js 18+ to simulate costs using live data.