LLM pricing where every rate carries its source and the date it was last confirmed.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Know the tab before you build.
Estimate, compare and understand what an AI feature will cost β from a catalog that re-checks itself every morning, so the numbers are never a year out of date.
β Open PromptSpend Β Β·Β free Β Β·Β open source Β Β·Β no accounts, no tracking
https://github.com/user-attachments/assets/8ddf3e53-2a97-4d86-ac93-d09507c387de
2 minutes 8 β press play, and hit π to unmute (GitHub starts videos silent). Β Β·Β Download the MP4
Every LLM cost calculator on the web has the same failure mode: it is a snapshot. Someone builds it, hard-codes a dozen model prices, and within a few months the entire premise is wrong β the models it compares have been superseded and the prices it quotes no longer exist.
PromptSpend is built the other way round. The pricing pipeline is the product; the calculator is what sits on top of it. Every morning a GitHub Action re-fetches the catalog from independent sources, merges them under an explicit trust order, runs sanity checks, and either commits the result or opens a pull request for a human. Capture patterns are family-level, so a brand-new model version is picked up automatically without anyone touching code.
Opt-in, and off unless a deployment is configured for them. Browser push stores nothing personal β a push subscription is an opaque URL the browser issues. Email is double opt-in with one-click unsubscribe, and stores your address, the models you follow, and the date you asked; nothing else. Either channel can watch the whole catalog or just the models you pick.
The delivery service is a Cloudflare Worker in worker/, with the push payload encryption
written out against RFC 8291 and checked byte for byte against the RFC's own worked example.
docs/ALERTS.md has the architecture, the cost model and the domain cutover.
| Output is priced separately | Output typically costs 3β5Γ input. Averaging the two, as many calculators do, understates most real workloads. |
| Chat history compounds | Turn N re-sends turns 1β¦Nβ1 as input, so conversation cost grows with the square of the turn count. |
| Tokenizers differ per family | The same pasted text is counted with each model's own tokenizer β exactly (js-tiktoken, run in your browser) for OpenAI-family models and with a clearly labelled calibrated ratio elsewhere. |
| Caching is not free | Cache writes cost 1.25Γ input at both OpenAI and Anthropic. Counting only the cheaper reads reports a saving your invoice will not have, so writes are billed and caching is off by default. |
| Long context costs more | Above 272K input tokens OpenAI bills the whole request at 2Γ input and 1.5Γ output. Tiers apply per request, so a conversation can cross over partway through. |
| Reasoning tokens are billable | A multiplier for hidden thinking tokens, because the visible answer is not what you pay for. |
| Promotional pricing expires | Introductory rates apply only inside their window, and the engine takes a date. |
| Assumptions are visible | Every non-published number used in a calculation is listed under the results, not buried β and so is what the prices do not cover. |
| Impossible scenarios are named | A request that will not fit the context window, or a response past the output ceiling, is flagged rather than priced as if it would work. |
The trust ladder, in order:
data/pricing-overrides.json) β win every conflict.A clean diff is committed and deployed automatically. A newly raised flag becomes a pull request β a
long-standing disagreement does not re-open one every morning. A run that loses a source or trips a size
guard is degraded: it publishes nothing, records why in public/data/sync-status.json, and fails
loudly. Either way the change lands in docs/pricing-changelog.md.
Nothing disappears on one bad morning. A model missing from the feed is kept and marked stale, not
deleted; retiring one for good is a deliberate edit to data/models-allowlist.json.
Rung 1 is worked by hand, and the split is published rather than blurred. Every row says which rung it
came from, and rows read against a vendor's own page carry the URL that was read and the date it was read.
Most of the catalog is now vendor-sourced β but not all of it, because some vendors do not publish a
pricing page that lists their own models, and the honest answer there is to leave the row labelled
litellm rather than launder an aggregator's number into a first-party claim. The models this currently
affects are named in docs/DEFERRED.md. A number is only worth what its worst source is,
so the site shows you the source per row instead of an average you cannot inspect.
A daily job reads the live site β not the copy in this repository β and raises an issue if the published catalog is more than two days old. That distinction is the whole point. Between a price moving upstream and you seeing it, four things can fail: the sync errors, the sync opens a review pull request nobody merges, the deploy fails after a green sync, or the CDN serves a stale artifact. Checking the file in git catches the first of those. Fetching what the site actually serves catches all four.
It exists because the sync once failed at the pull-request step and nothing said so; the site quietly served a day-old catalog until someone happened to look. A project that claims its numbers are never a year out of date should be the first to know when they are.
The site shows prices last changed and sources last checked separately, because they answer different questions. A quiet week in the market makes the first date age while everything works perfectly; a broken scheduler looks exactly the same if you only publish one date. The second comes from a health manifest written on every run, successful or not:
Right now the first of those reads not yet recorded, and that is correct rather than broken. No vendor has moved a price since this catalog's history began on 2026-08-01, so there is no date to show β and the alternative, quietly displaying the last build date, would announce a price change every morning nothing happened. An empty field you can trust beats a populated one you cannot.
The second is now a state and not just a date: the chip on the results panel is green while the sources were checked within a day, blue at two days, amber past the window the freshness monitor tolerates or after a degraded run, and outlined-grey when the manifest could not be loaded at all. That last state exists on purpose. A status light that reads "fine" when its own evidence is missing is precisely the failure the monitor was built to catch.
Keeping "prices last changed" honest means the pipeline has to tell apart three events that all look like a diff:
| What happened | lastChanged | |
|---|---|---|
| Price change | Same source, different number. The vendor repriced. | stamped |
| Coverage | A field went from absent to present. We started recording a rate that was always offered. | untouched |
| Correction | The number moved in the same run its source URL did. We had been reading the wrong page. | untouched |
Only the first is news. Conflating them is not hypothetical: reading x.ai's real pricing page instead of
its model list once gained a long-context tier and restated a cached-input rate, and the catalog stamped
both as price changes β putting PRICES CHANGED 2026-08-06 on the busiest panel of the site with no
vendor having touched a rate. Suppressing corrections can hide a genuine same-day move, and that trade is
deliberate: on a catalog whose whole claim is provenance, announcing a change nobody made costs more than
missing one by a day.
There is a free, keyless, CORS-open API at promptspend.dev β no account, no rate limit, no logging of who calls it:
Filters: ?provider=, ?status=, ?aliases=include. Every response carries
X-PromptSpend-Generated-At, and OpenAPI 3.1 lives at
/openapi.json. See docs/API.md.
Other pricing MCP servers exist and index more models than this one. What none of them do is tell you where a number came from and when it was last confirmed β the competing server's own documentation says only that pricing "is updated regularly", with no verification date per price. That gap is the reason this exists.
It matters more to a model than to a person. Someone reading a web page sees the interface around a figure and calibrates. A model handed a bare number repeats it with whatever confidence the sentence implies. Given the source and the date it can say "as of 1 August, per OpenAI's pricing page" β and when two sources disagree it is told so, rather than being handed a number somebody picked.
Three tools, deliberately. estimate_cost is the one a price lookup cannot provide: it runs this
repository's cost engine, imported rather than reimplemented, so it accounts for compounding
conversation history, cache writes, long-context tiers and reasoning tokens β and cannot report a
figure that disagrees with the calculator, because it is the same code. A test asserts that.
And because MCP tool definitions load into your context on every turn, the server's own overhead is measured, budgeted at 900, checked in CI and published: ~700 tokens. Nothing else in the ecosystem appears to publish its own footprint. See mcp/README.md.
The same catalog, on the line of code that chooses the model.
A linter for model choice rather than a calculator in a sidebar β a calculator in an editor is
only this website with worse ergonomics. What an editor can do that a web page cannot is notice
things: a nearby max_tokens becomes the output ceiling in money, a cap above what the model can
emit is named rather than priced as though it would work, deprecated and disputed rows reach the
Problems panel, and an Explorer view lists every model the repository calls, dearest first.
Everything it says is Information severity, never a warning. None of these are mistakes and the extension has no idea what the code needs. The cheaper-model suggestion is off by default for the same reason the value map's capability axis is labelled illustrative: it is an opinion, where the rest are facts.
Or search PromptSpend in the Extensions pane. It is on Open VSX too, which is where Cursor, Windsurf and VSCodium look.
Same rule as everywhere else β no bundled prices. If the catalog cannot be reached it says so and shows nothing, and the status bar carries the generation date at all times. See vscode/README.md.
Or read the file the API reads. The catalog is plain, versioned JSON with a stable shape:
Optional fields worth knowing: aliasOf marks an id that routes to another model (so it is not counted
twice), provenance.stale marks a row upstream has stopped listing, and provenance.needsReview plus
reviewNote carry an unresolved disagreement and both numbers involved.
provenance.lastChanged is optional too, and absent on every model today β this catalog's recorded
history starts on 2026-08-01 and no vendor has moved a price since, so there is no date to report. Read
its absence as "no change on record", never as "unknown freshness": lastVerified answers that, and it
is always there. A field that reported the last sync instead would read "changed today" every morning,
which is the one failure a provenance catalog cannot afford β so it stays empty until a rate actually
moves.
verify is typecheck, lint, format check, an encoding check, tests with coverage thresholds, the
published test counts, the published page counts, a production build, catalog schema validation, the
bundle budget, the Content Security Policy and the SEO checks. The deploy workflow calls the same reusable workflow CI does and
publishes the artifact it produced, so a commit that fails any of them cannot reach the live site.
It does not run the other four packages' suites β CI has a job each for api/, mcp/, vscode/ and
worker/. See CONTRIBUTING.md.
Beyond the calculator, the build writes 159 crawlable pages β one per model, one per provider, and a curated set of head-to-heads β from the same catalog and the same cost engine. See docs/PAGES.md.
Cobalt on a cool-paper canvas, with a distinct set of money colours that never change with branding:
green means savings, red means this option costs more. The input/output chart pair is validated for
colour-vision deficiency in CI β src/lib/palette.test.ts simulates protanopia and deuteranopia and
fails the build if the two marks stop being distinguishable.
src/lib/contrast.test.ts reads tokens.css directly and fails the build if any accent, on any theme and
any canvas, drops below 4.5:1 against a surface it can appear on. Every interactive target is at least
24Γ24 (44Γ44 on touch), no text renders below 12px, and there is no horizontal page scroll from 320px up.
Keyboard navigation throughout β including every point on the value map, which is a real button β focus is
returned when a dialog closes, prefers-reduced-motion is respected in JavaScript as well as CSS, and
there is a Ctrl/Cmd+K command palette.
| Document | What is in it |
|---|---|
| docs/ARCHITECTURE.md | How the pipeline, the engine and the state layer work, and why each is shaped that way |
| docs/TESTING.md | What the 777 tests cover, the uneven coverage thresholds, and what the suite deliberately does not cover |
| docs/TROUBLESHOOTING.md | "The estimate does not match my bill", flagged prices, missing models, running it locally |
| docs/PAGES.md | The 159 generated pages: what is built, why the comparison set is curated, and the IndexNow pipeline |
| docs/API.md | The public pricing API on promptspend.dev β endpoints, why it fetches rather than bundles, going live |
| docs/DOMAINS.md | What each hostname serves and why, plus the cutover runbook and rollback |
| docs/ALERTS.md | The price-alerts Worker β push and email architecture, the cost model, the domain cutover |
| docs/pricing-changelog.md | Every price change the daily sync has published, written by the pipeline itself |
| CHANGELOG.md | Changes to the application, as opposed to the data |
| docs/DEFERRED.md | Work proposed and deliberately not done yet, with the reason β a decision, not a gap |
| docs/PROMO.md | How the promo video is built from real screenshots, and how to rebuild it |
| mcp/README.md | The MCP server β pricing for coding agents, with the source and date on every number |
| vscode/README.md | The VS Code extension β prices on the line of code that chooses the model |
| CONTRIBUTING.md | Adding a model, the house style, and the rules that are not negotiable |
| SECURITY.md | What is in scope β including a wrong price, which is treated as the most serious class of bug |
Adding a model is usually a one-line change. See CONTRIBUTING.md, or open a model request and someone will pick it up.
Not a code change? info@promptspend.com. Security reports go to security@promptspend.com or GitHub's private vulnerability reporting β see SECURITY.md.
The three rules that are not up for negotiation, because breaking any of them turns an estimator into a guess with good typography:
The point of this section is that it is longer than it needs to be. An estimator that hides its edges is just a confident guess.
The estimator itself sends nothing anywhere. No accounts, no analytics, no cookies. Fonts are
self-hosted. Pasted prompt text is tokenised in your browser, deliberately excluded from the shareable
URL, held in a bounded in-memory cache, and gone when you close the tab. localStorage holds two things:
whether you dismissed the welcome banner, and your theme choice.
Price alerts are the one exception, and only if you opt in. They are a feature you have to switch on, and they are the only reason this project has a server at all (a Cloudflare Worker β docs/ALERTS.md). Precisely what changes:
connect-src for that one API origin, and β only where Turnstile is
configured β script-src and frame-src for challenges.cloudflare.com. Nothing else, ever. That
connect-src line is what stops a compromised dependency exfiltrating a pasted prompt, so it is
generated from one configured value rather than hand-maintained.A deployment with no API configured β which is what this repository builds by default β keeps a strictly self-only policy and says on screen that alerts are not switched on, rather than rendering a form that cannot work.
See SECURITY.md. Wrong prices are treated as the most serious class of bug this project can have, and are explicitly in scope for a report.
MIT β see LICENSE. The self-hosted typefaces (Space Grotesk, IBM Plex Sans, JetBrains Mono) are SIL Open Font License 1.1.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/promptspend)<a href="https://allmcps.com/mcp/promptspend"><img src="https://allmcps.com/api/badge/promptspend?style=directory" alt="PromptSpend on AllMCPs" /></a>