$T TokenCostDB
Verified: 2026-11-30 · Zero Auth Required

Open AI Pricing JSON API & Machine-Readable Endpoints

All endpoints below are served directly from Cloudflare’s global edge with CORS enabled (Access-Control-Allow-Origin: *), 1-hour edge caching, and automated sanity-check protection.

Quick Usage Examples

cURL + jq

curl -sS https://ai-cost-calc-preview.pages.dev/api/prices.json | jq '.models[:5] | map({id, pricingBasis, effective})'

Node.js / TypeScript

const res = await fetch('https://ai-cost-calc-preview.pages.dev/api/prices.json');
const { verifiedAt, models } = await res.json();
const claude = models.find((m) => m.id.includes('claude-sonnet'));
console.log(verifiedAt, claude?.effective);

AI Agents & Crawlers

LLM coding tools and research agents can read /llms.txt for a compact Markdown sitemap of all calculators, endpoints, and flagship model pages, or subscribe to pricing updates via /rss.xml.