Free Public API · No auth · MIT

AI model pricing data,
free for everyone

A community-friendly JSON API exposing the same pricing data that powers the calculator. LiteLLM-verified, reconciled daily, CDN-cached. Build cost estimators, comparison tools, internal dashboards — no signup required.

30-second start

Just fetch it.

No API key, no rate limits for normal use, no signup. Hit any endpoint with a GET request.

# Get all models
curl https://aicostcalc.net/api/v1/models

# Get a single model
curl https://aicostcalc.net/api/v1/models/gpt-5-5

# Get just pricing (lighter payload)
curl https://aicostcalc.net/api/v1/pricing?provider=anthropic

All responses are JSON, all CORS-enabled, all aggressively CDN-cached (1 hour browser, 24 hour edge).

Endpoints

Four endpoints. Zero ceremony.

GET/api/v1/models

All 50 models with full data (pricing, limits, capabilities, lifecycle). New models appear the day they reach the LiteLLM registry.

Example:
GET /api/v1/models
GET /api/v1/models?provider=anthropic
GET /api/v1/models?category=flagship
GET /api/v1/models?capability=caching
GET /api/v1/models?status=active
Filters: provider / category / capability / status. Filters compose with AND.
GET/api/v1/models/{id}

Full data for a single model. Accepts the dashed id or the dotted form of the model name; when a non-canonical form is used, _meta.resolvedFrom records what you asked for. Returns 404 with availableIds if nothing matches.

Example:
GET /api/v1/models/gpt-6-luna
GET /api/v1/models/gpt-6.luna      # same model
GET /api/v1/models/claude-opus-4-7
GET/api/v1/pricing

Prices and limits only, plus lifecycle (status, deprecatedAt, successorId) so you never route to a retired model. Same filters as /models.

Example:
GET /api/v1/pricing
GET /api/v1/pricing?provider=openai
GET /api/v1/pricing?status=active     # exclude retired models
GET/api/v1/changes

New models and price changes, newest first — the JSON form of the changelog. Each event carries before/after prices and the change in per-call cost. Our own data corrections are excluded.

Example:
GET /api/v1/changes
GET /api/v1/changes?since=2026-09-01
GET /api/v1/changes?kind=price-cut,price-rise
GET /api/v1/changes?provider=anthropic&limit=20
kind: released (provider release date) / added (day we started listing it) / price-cut / price-rise / price-change. Also available as RSS and a web page.
Schema

What you get back

Full schema reference is in our TypeScript types file. The shape of a model entry:

{
  "id": "gpt-5-5",
  "name": "GPT-5.5",
  "shortName": "GPT-5.5",
  "provider": "OpenAI",
  "providerId": "openai",
  "category": "flagship",          // flagship | small | reasoning | balanced
  "useCase": ["general", "vision", "reasoning", "coding"],
  "releaseDate": "2026-04-23",      // null when unknown (v2.1) — see below
  "status": "active",              // active | deprecated | preview | legacy
  "deprecatedAt": null,
  "successorId": null,

  "pricing": {
    "currency": "USD",
    "unit": "per_1m_tokens",
    "input": 5.00,
    "output": 30.00,
    "cachedInput": 0.50,           // null if not supported
    "cacheWrite": null,            // null if not supported
    "batchInput": 2.50,            // null if not supported
    "batchOutput": 15.00,
    "imagePerImage": null,         // null until image pricing added (V1.1)
    "reasoningOutput": null,
    "fineTunedInput": null,
    "fineTunedOutput": null
  },

  "limits": {
    "contextWindow": 1050000,
    "maxOutput": 128000,
    "maxImagesPerRequest": null,
    "knowledgeCutoff": "2026-02"
  },

  "tokenization": {
    "encoder": "o200k_base",       // tiktoken encoder, or "approximate"
    "approximationRatio": { "english": 4, "chinese": 1.5, "code": 3 }
  },

  "supports": {
    "vision": true, "audio": false, "tools": true, "streaming": true,
    "caching": true, "batch": true, "fineTuning": false, "structuredOutput": true
  },

  "lastVerified": "2026-05-12",
  "sources": [
    { "type": "community", "url": "...", "fetchedAt": "..." },
    { "type": "official",  "url": "...", "fetchedAt": "..." }
  ],
  "priceHistory": [
    { "date": "2026-04-23", "input": 5.00, "output": 30.00, "note": "Initial release" }
  ],
  "i18n": {
    "en": { "tagline": "...", "description": "..." },
    "zh": { "tagline": "...", "description": "..." }
  },

  "draft": {                       // present only on auto-listed models (v2.1)
    "generatedAt": "2026-09-29",
    "note": "..."
  }
}
Schema 2.1 — changes from 2.0
  • releaseDate can be null. Models listed automatically from the registry have no known release date, and we don't invent one. Type it as string | null.
  • draft is an optional object on models published automatically the day they appeared. Prices and limits on a draft are as reliable as any other entry; only the prose description is awaiting review.
  • /api/v1/pricing now includes status, deprecatedAt and successorId, and supports all four filters.

No field was renamed or removed. The one change that can break a strictly typed client is releaseDate becoming nullable.

Data accuracy

Where the numbers come from

  • ✓Primary source: LiteLLM's public model registry — the de facto industry standard, used by millions of LangChain and LiteLLM installations. Errors get caught and PR'd by the community within hours.
  • ✓Secondary source: Each provider's official pricing page (links in every model's sources field).
  • ✓Refresh cadence: Daily — prices are reconciled against the LiteLLM registry every morning (06:15 UTC) and corrections deploy automatically against both sources, with diff review before publication.
  • ⚠Disclaimer: This is informational data. For final billing accuracy, always verify against the provider's own pricing page. Spotted an error? Open a GitHub issue — corrections typically deploy within 24 hours.
What people build with this

Some ideas

Internal cost dashboards
Pipe pricing into your team's BI tool. See your AI spend against current public rates.
Slack/Discord bots
/cost gpt-5.5 → instant pricing. /compare gpt-5.5 claude-opus-4-7 → side-by-side.
Browser extensions
Inject cost estimates into provider playground / chat UI based on token count.
AI model recommendation UX
In your AI product, recommend the cheapest model meeting a capability requirement.
FinOps automation
Flag when a model's price changes (poll the API, diff against last snapshot).
AI gateway / proxy
Route requests to the cheapest available model that supports the required capability.
License

MIT

The data is free to use commercially, embed in products, redistribute. Attribution appreciated but not required. The same license applies to the source code.

Rate limits

None for normal use

Vercel CDN handles the load. Cached at edge for 24 hours, so most requests never even hit the origin. If you're planning 10K+ requests/hour, please say hi so we can size accordingly.

Built something with this?

Tell us on GitHub — we'll feature it here.

Share what you built →