Free LLM pricing API

Two JSON endpoints, no key, no rate limit, CORS enabled. Static files on a CDN, so they are fast and they will not go down. Licensed CC-BY — use them in your own dashboards, just keep the attribution.

Endpoints

GET /api/models.json

45 current models across five providers. Per model: input, output and cached-input pricing, off-peak rates where a provider bills by time of day, long-context tiers, batch discount, context window, tokenizer factor, minimum cacheable prefix, and any announced retirement date with its replacement.

GET /api/deprecations.json

53 announced deprecations and shutdowns, sorted by date, each with the official replacement model. Rows where a provider publishes a floor rather than a fixed date carry tentative: true.

Example

# What does Claude Sonnet 5 cost, and when does it retire?
curl -s https://tokengauge.dev/api/models.json \
  | jq '.models[] | select(.id=="claude-sonnet-5")'

# Which models shut down in the next 90 days?
curl -s https://tokengauge.dev/api/deprecations.json \
  | jq --arg d "$(date -u -d '+90 days' +%F)" \
       '.deprecations[] | select(.shutdown <= $d)'

# Cheapest model by input price
curl -s https://tokengauge.dev/api/models.json \
  | jq '[.models[]] | sort_by(.pricing.input) | .[0] | {id, input: .pricing.input}'

What we promise, and what we do not

We promise: every figure traces to the provider's official documentation, the payload carries a lastVerified date, and fields a provider does not publish are null rather than guessed. Data is re-checked against source docs on a schedule — DeepSeek restructured its pricing on 16 August 2026 and this dataset reflected it the same day.

We do not promise: a stable schema before v1, uptime guarantees, or that we have caught every change the moment it happens. Pin to lastVerified and treat the provider's own docs as authoritative for anything contractual.

Attribution

Licensed under CC BY 4.0 . Credit as “TokenGauge — https://tokengauge.dev”.