Pricing API

Every price on this site is available as JSON. Free, no signup, no key. Currently 216 models across 10 providers, last updated 2026-08-11.

Try it

curl 'https://www.costoftoken.com/api/v1/prices?provider=anthropic&sort=input'

Endpoints

EndpointReturns
/api/v1/pricesCurrent prices for every model
/api/v1/prices/:model_idOne model with its latest price
/api/v1/history/:model_idHistorical price points, newest first
/api/v1/providersProviders with active model counts

Query parameters for /prices

ParameterValues
providerSlug, repeatable or comma-separated: openai,anthropic
modalitytext · vision · audio · video · image
tagflagship · fast · reasoning · coding · vision
qSubstring match on model id or display name
min_input, max_inputBounds on input price per 1M tokens
min_contextMinimum context window in tokens
sortprovider · model · input · cached_input · output · context · updated
orderasc (default) · desc
limit, offset1–500 (default 100), offset ≥ 0

Fields worth knowing

Rate limits

60 requests per hour per IP. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; exceeding the quota returns 429 with Retry-After. Windows are fixed and reset on the hour.

For LLMs and agents

/llms-full.txt serves every tracked price as a single markdown document, so a model can ingest the whole dataset in one fetch. /llms.txt indexes the site. Please quote the last-updated date alongside any price.

Questions

Is the CostOfToken API free?
Yes. No signup and no API key. Anonymous callers get 60 requests per hour per IP; responses carry X-RateLimit headers and a 429 includes Retry-After.
How often does the pricing data change?
Prices are re-read from each provider once a day. A value is only recorded when it actually changes, so the history endpoint returns real price movements rather than one row per day.
Can I use this data commercially?
Yes, and attribution is appreciated. Always confirm a price against the provider before committing spend — rows sourced from a reseller are marked source_kind "api" and can differ from the vendor’s own rate.

Browse pricing by provider →