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
| Endpoint | Returns |
|---|---|
GET /v1/models | Every model in full — rates, context window, tokenizer, capabilities, provenance. |
GET /v1/models/{id} | One model. 404 if the id is unknown. |
GET /v1/providers | Every provider, with how many models each publishes. |
GET /v1/prices | Flat rows: id, provider, input, output, cache rates, context window. The numbers only. |
GET /v1/prices.csv | The same rows as CSV, for a spreadsheet. |
GET /v1/health | Whether this API can currently read and validate the catalog. |
GET /badge/{id}.svg | An embeddable price badge for one model — current price and confirmation date. |
GET /badge/{id}.json | The same badge as a shields.io endpoint, for img.shields.io/endpoint?url=. |
GET /openapi.json | OpenAPI 3.1 description of everything above. |
GET /llms.txt | The same, in the form an agent reads first. |
GET /sitemap.xml | The single indexable developer-hub URL. |
GET /style.css | The 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
- All rates are USD per 1,000,000 tokens.
- Standard tier, global endpoint, list price. Regional and data-residency premiums, priority tiers, server-side tool fees and negotiated discounts are not included.
longContext, where present, replaces the base rates for a request above its threshold — the whole request, not just the excess.batchDiscountis a multiplier:0.5means half price.capabilityIndexis a rough estimate and is absent when unscored. Do not substitute a number for a missing one.
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
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.
[](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:

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
- MIT licensed, like the project. Use it in anything, including commercially.
- Attribution is appreciated and not required. A link to promptspend.com helps.
- No SLA. It is a Cloudflare Worker in front of a static file, which is about as reliable as free gets, but do not put it in a payment path.
- These are list prices, not a quote. Check the vendor before you commit money to a number. Every row links to where it came from for exactly that reason.
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.