LLM pricing

Free LLM pricing API

In short: GET https://fiscallm.com/api/v1/prices returns the current list price of every model in our price table as JSON. No key. Prices were last checked on 2026-10-18.

List prices

curl "https://fiscallm.com/api/v1/prices?provider=anthropic&q=haiku"

Both filters are optional: provider is openai, anthropic or google, and q matches part of a model ID. The answer has count and models, plus the currency, unit and the date of the last check.

One model

curl https://fiscallm.com/api/v1/prices/claude-sonnet-4-5

{
  "currency": "USD",
  "unit": "per 1,000,000 tokens (unitPrices are per image, second, minute or character)",
  "tier": "list price, standard tier",
  "checked": "2026-10-18",
  "source": "https://fiscallm.com/llm-pricing",
  "audit": "https://github.com/magna56/fiscallm/blob/main/ACCURACY.md",
  "license": "MIT",
  "model": {
    "id": "claude-sonnet-4-5",
    "provider": "anthropic",
    "inputPerMtok": 3,
    "outputPerMtok": 15,
    "cachedInputPerMtok": 0.3,
    "cacheWritePerMtok": 3.75,
    "url": "https://fiscallm.com/llm-pricing/claude-sonnet-4-5"
  }
}

Dated IDs and provider prefixes resolve to the same model, so openai/gpt-4o-mini works. Where they apply, a model also has longContext (the rate above a prompt size), unitPrices (images, audio, video) and next (an announced price change and its date). An unknown model returns 404.

Estimate a call

curl "https://fiscallm.com/api/v1/estimate?model=gpt-4o-mini&input=1500&output=400&cached=1000&calls=300"

{
  "provider": "openai",
  "model": "gpt-4o-mini",
  "costUsd": 0.00039,
  "calls": 300,
  "totalUsd": 0.117,
  "inputTokens": 1500,
  "outputTokens": 400,
  "cachedTokens": 1000,
  "cacheWriteTokens": 0,
  "currency": "USD",
  "checked": "2026-10-18"
}
ParameterMeaning
modelModel ID (required)
inputPrompt tokens per call, including any cached ones
outputReply tokens per call
cachedHow many of the prompt tokens are read from the prompt cache
cache_writePrompt tokens written to the cache (Anthropic)
callsNumber of calls like this one; default 1

For AI agents

The same data is available to assistants as tools through the FiscaLLM MCP server at https://fiscallm.com/api/mcp, which adds model comparison and subscription break-even. The API is described in openapi.json.

From list price to your real cost

A price table tells you what a call costs. It does not tell you which of your users cost more than they pay. FiscaLLM adds up real usage per user and sets it next to revenue. See the demo or read how it works.

Questions

Is the LLM pricing API free?

Yes. No key and no sign-up. Answers are cached for an hour, so please cache on your side too rather than calling it on every request.

Where do the prices come from?

From FiscaLLM's open-source price table (MIT), checked against the OpenAI, Anthropic and Google pricing pages. Every answer includes the date of the last check.

Which prices are these?

List prices in USD per million tokens, standard tier. Batch discounts, priority tiers and negotiated rates are not included.

Can I call it from a browser?

Yes. Every endpoint sends Access-Control-Allow-Origin: *.

How do I get the cost of my own app's calls per user?

That is what FiscaLLM itself does: send usage from your backend and it prices each call and adds it up per user, next to revenue.