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.jsonCopy
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
Field Type Description
name string Model name as listed by the provider
provider string Provider name (OpenAI, Anthropic, Google, etc.)
category string flagship · mid · budget · reasoning · embedding · vision
input_per_1m_usd number Price per 1 million input/prompt tokens (USD)
output_per_1m_usd number Price per 1 million output/completion tokens (USD)
context_k number Context 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
Free to use for any project — commercial and non-commercial.
Attribution appreciated: Data by APICostCalc in your UI or README.
Prices are reference estimates from official pricing pages. Verify before billing.
No SLA — this is a free community resource. Use caching (TTL: 24h recommended).
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.