PromptSpend Pricing API

Current published API prices for every language model this catalog tracks, as JSON. No key, no account, no rate limit. Re-checked against every vendor each morning, and every row tells you where its number came from and when it was last confirmed.

Try it

curl https://promptspend.dev/v1/prices

Or from a browser, from any origin — CORS is open on every endpoint.

Endpoints

EndpointReturns
GET /v1/modelsEvery model in full — rates, context window, tokenizer, capabilities, provenance.
GET /v1/models/{id}One model. 404 if the id is unknown.
GET /v1/providersEvery provider, with how many models each publishes.
GET /v1/pricesFlat rows: id, provider, input, output, cache rates, context window. The numbers only.
GET /v1/prices.csvThe same rows as CSV, for a spreadsheet.
GET /v1/healthWhether this API can currently read and validate the catalog.
GET /badge/{id}.svgAn embeddable price badge for one model — current price and confirmation date.
GET /badge/{id}.jsonThe same badge as a shields.io endpoint, for img.shields.io/endpoint?url=.
GET /openapi.jsonOpenAPI 3.1 description of everything above.
GET /llms.txtThe same, in the form an agent reads first.
GET /sitemap.xmlThe single indexable developer-hub URL.
GET /style.cssThe hub stylesheet.

/v1/models, /v1/prices and /v1/prices.csv all accept ?provider=, ?status= and ?aliases=include. Routing aliases are excluded by default, so one purchasable model is never counted twice.

What a price means

Freshness

Every /v1/ response carries X-PromptSpend-Generated-At, and list bodies repeat it as generatedAt. Responses are cached for five minutes at the edge. If the origin is unreachable, a retained copy is served with X-PromptSpend-Stale: true. The same warning appears when the daily sync is degraded or the catalog exceeds its 48-hour ceiling. Stale responses require revalidation, and /v1/health returns 503 until freshness recovers.

Per model, provenance.lastVerified is when the price was last confirmed against its source and provenance.lastChanged is when the published rate last actually moved. provenance.needsReview means two independent sources disagreed and a human has not adjudicated yet — treat those rows with suspicion, which is why they are flagged rather than hidden.

lastChanged is absent until a rate is observed to move. This catalog's recorded history begins on 2026-08-01, and only models whose rate has actually changed since then carry the field; a field that quietly reported the last sync instead would say "changed today" every morning, which is the one failure a provenance API cannot afford. Treat its absence as "no change on record", never as "unknown freshness": lastVerified answers that question, and it is always present. For which models have moved lately, read the field from /v1/prices; it is current, where a sentence here would not be.

"Moved" is narrower than "differs", and the difference is the point. A rate going from absent to a value means this catalog started tracking a tier the vendor was already offering — coverage, not a price change. A rate that changes in the same run its source URL changes is a correction: we had been reading the wrong page. Neither stamps lastChanged. Only a different number from the same source does.

Example

$ curl -s https://promptspend.dev/v1/models/claude-opus-5 | jq '{id, pricing, provenance}'
{
  "id": "claude-opus-5",
  "pricing": {
    "input": 5,
    "output": 25,
    "cachedInput": 0.5,
    "cacheWrite": 6.25,
    "batchDiscount": 0.5
  },
  "provenance": {
    "source": "vendor",
    "lastVerified": "2026-08-01",
    "verifiedUrl": "https://platform.claude.com/docs/en/about-claude/pricing"
  }
}

Embed a price badge

claude-opus-5 price

One image, no build step. The date shown is the day that price was last confirmed against its source, not the day the badge happened to render — this Worker sends Cache-Control: no-cache, so GitHub's Camo proxy revalidates on every fetch instead of serving a cached image with yesterday's date on it.

[![claude-opus-5 price](https://promptspend.dev/badge/claude-opus-5.svg)](https://promptspend.dev/)

Swap claude-opus-5 for any id from /v1/models. An id this catalog does not track still renders — a plain gray "model not found" badge, never a broken image.

Prefer shields.io's own badge styles (flat-square, for-the-badge, plastic)? Point its endpoint badge at the JSON instead of the SVG:

![price](https://img.shields.io/endpoint?url=https%3A%2F%2Fpromptspend.dev%2Fbadge%2Fclaude-opus-5.json)

Inside a coding agent

The same data, as an MCP server. Every price it returns carries the source and the date it was last confirmed, and disputed prices are marked rather than quietly resolved — which matters more to a model than to a person. Someone reading this page can see the interface around a number and judge it. A model handed a bare figure repeats it with whatever confidence the sentence implies.

$ claude mcp add promptspend -- npx -y @promptspend/mcp

Or with nothing to install: the same server is hosted at https://promptspend.dev/mcp. Add that URL as a custom connector in Claude.ai or ChatGPT, or in Claude Code:

$ claude mcp add --transport http promptspend https://promptspend.dev/mcp

Three tools, deliberately. estimate_cost is the one a price lookup cannot provide: it runs this site's own cost engine, so it accounts for conversation history compounding, cache writes costing more than input, long-context tiers and reasoning tokens — and cannot report a number that disagrees with the calculator, because it is the same code.

get_price also takes as_of, a past date, and answers from the published price history; a later correction comes back with the figure. estimate_cost also takes usage, measured token totals such as a month from a usage export.

The same tools come as an Agent Skill, which costs context only when a price question comes up, and there is a GitHub check that fails a build when a model your code calls changes price or is retired.

It adds about 897 tokens to your context per turn. Tool definitions load into every message for as long as a server is connected, so that figure is budgeted, checked in CI, and published here rather than left for you to discover. Source and the measurement.

Terms, such as they are

Prefer a calculator?

promptspend.com costs a real workload across every model in this catalog, and publishes a page per model at promptspend.com/models/.

On a phone? The same catalog runs in free native apps for iPhone and iPad and Android. About the apps.