Home › Pricing API

LLM Pricing Data API

387 AI models · No API key · Updated monthly · Free forever

FREE

Endpoint

One static JSON file, publicly accessible, no authentication required:

GET https://apicostcalc.com/pricing.json

Quick start

// JavaScript const res = await fetch('https://apicostcalc.com/pricing.json'); const { models } = await res.json(); // Find cheapest model for your workload const cost = m => m.input_per_1m_usd * 0.8 + m.output_per_1m_usd * 0.2; const sorted = models.sort((a, b) => cost(a) - cost(b)); console.log(sorted[0].name, 'is cheapest');
# Python import requests data = requests.get('https://apicostcalc.com/pricing.json').json() models = data['models'] # Sort by input price cheapest = sorted(models, key=lambda m: m['input_per_1m_usd']) print(cheapest[0])

Response structure

{ "schema_version": "1", "updated": "2026-07", "model_count": 387, "models": [ { "name": "Claude Opus 4.8", "provider": "Anthropic", "category": "flagship", "input_per_1m_usd": 5.0, "output_per_1m_usd": 25.0, "context_k": 200 }, // ... 386 more models ] }

Fields

FieldTypeDescription
namestringModel name as listed by the provider
providerstringProvider name (OpenAI, Anthropic, Google, etc.)
categorystringflagship · mid · budget · reasoning · embedding · vision
input_per_1m_usdnumberPrice per 1 million input/prompt tokens (USD)
output_per_1m_usdnumberPrice per 1 million output/completion tokens (USD)
context_knumberContext window size in thousands of tokens

Coverage — July 2026

387 models across 30+ providers including OpenAI, Anthropic, Google, Mistral, Meta, Cohere, xAI, DeepSeek, Amazon Bedrock, Azure OpenAI, and more. Embeddings, vision, reasoning, and realtime audio models included.

Usage terms

Limits & caching

No rate limits — it's a static file served by CDN. Cache it on your end (the data updates at most monthly). File size: ~73KB.

Related tools

If you need to use the pricing data interactively: LLM Price Comparison · AI Cost Calculator · 🔔 Price change alerts

Want more? Historical prices, webhook alerts when prices change, and coverage for 200+ non-LLM APIs (payments, SMS, maps, cloud) are planned for Pro. Contact us if you'd build on that.
Host your project:DigitalOcean — $200 free ↗Hostinger VPS

Exchanges

BybitBinanceOKXKuCoinBitgetGate.ioMEXC

Tools & Hosting

📈 TradingView🔒 NordVPN💳 RevolutDigitalOcean $200Hostinger