Guide · Pricing data

A Free Live JSON Feed of LLM Prices (and How It Stays Accurate)

By Ghiles Asmani, founder of Weckr · Published August 5, 2026

Short version: useweckr.com/pricing.json is a free, no signup JSON feed of per token LLM prices for OpenAI, Anthropic, Gemini, and Kimi. It is generated from the table Weckr bills with and a weekly watcher opens a reviewed pull request whenever a provider changes rates, so it tracks reality instead of drifting the way hardcoded tables do.

If you have ever built a cost dashboard, a budget alert, or a token calculator, you have hardcoded a price table. And that table is now wrong, or will be soon. This page is the feed we built so neither of us has to do that again, plus exactly how it works so you can judge whether to trust it.

The feed

One GET, no auth: https://useweckr.com/pricing.json. Prices are USD per million tokens. Shape:

{
  "unit": "USD per 1,000,000 tokens",
  "lastVerified": { "openai": "2026-08-05", "anthropic": "2026-07-19", ... },
  "models": {
    "gpt-5.4-mini":    { "provider": "openai",    "input": 0.75, "output": 4.5,  "cachedInput": 0.075 },
    "claude-opus-4-8": { "provider": "anthropic", "input": 5,    "output": 25,   "cachedInput": 0.5, "cacheWrite": 6.25 },
    "gemini-3.6-flash":{ "provider": "gemini",    "input": 1.5,  "output": 7.5,  "cachedInput": 0.15 },
    "kimi-k2.6":       { "provider": "kimi",      "input": 0.95, "output": 4,    "cachedInput": 0.16 }
  }
}

It covers the current generations (GPT-5.6 and 5.4, Claude Opus 4.8, Sonnet 4.6, Haiku 4.5, Gemini 3.x, Kimi K2.x and K3) plus the legacy families people still run, 43 models at the time of writing. Responses are cached for 24 hours.

Why live beats hardcoded

A price table is correct the day you write it and silently wrong afterward. The fresh example: on July 30, 2026 OpenAI cut GPT-5.6 Luna by 80 percent, covered in detail in the GPT-5.6 price drop. Any tool carrying Luna at the old rate overstates its cost five times: budget alerts fire early, margin numbers lie, and routing logic avoids the cheapest capable model in the lineup. We know because our own table did it for six days before our watcher caught it. Turning tokens into dollars correctly also needs the cache rates, which the feed includes; the arithmetic itself is in the Claude API cost calculator.

How it stays accurate, concretely

  • Single source of truth.The feed is generated from the same table Weckr uses to recompute every customer’s cost server side. If it drifted, our own billing would drift, so nobody has more incentive to keep it right than we do.
  • Weekly automated diff. A watcher compares the table against published provider rates every Monday and opens a pull request with the exact changes when something moved.
  • Human review, always. Nothing edits billing math automatically. A person verifies each number against the provider page before merging. The watcher is open source in the weckr-sdks repository.
  • Dated honesty. Every provider carries a lastVerified date, so you can see exactly how fresh the numbers are instead of taking our word for it.

Using it in code

Fetch and compute:

const { models } = await fetch('https://useweckr.com/pricing.json').then(r => r.json());
const p = models['gpt-5.4-mini'];
const costUsd = (inputTokens / 1e6) * p.input + (outputTokens / 1e6) * p.output;

Or skip the arithmetic: @weckr/sdk exports the same table with helpers, including resolvePricing, which maps dated model ids like gpt-5.4-mini-2026-05-01 to their family so you never price an id miss as zero:

import { calculateCost } from '@weckr/sdk';
const { costUsd } = calculateCost('claude-opus-4-8', 8000, 1200); // $0.07

If you work in Claude Code, the Weckr Claude Skills read this feed live, so your assistant quotes current prices instead of its training data.

FAQ

Where can I get LLM prices as JSON?

Weckr publishes a free live feed at useweckr.com/pricing.json covering current and legacy OpenAI, Anthropic, Gemini, and Kimi models. Each entry has input, output, and cached input prices in USD per million tokens, plus cache write for Anthropic, a provider field, and a lastVerified date per provider. No key, no signup, 24 hour cache.

Why not just hardcode model prices in my app?

Because providers change them without ceremony and your hardcoded copy fails silently. OpenAI cut GPT-5.6 Luna by 80 percent in July 2026; any table carrying the old number overstated Luna cost five times from that day on. A hardcoded table is not wrong when you write it, it is wrong three weeks later, and nothing tells you.

How does the Weckr pricing feed stay accurate?

Two mechanisms. The feed is generated from the exact table Weckr uses to recompute customer cost server side, so it cannot drift from what we bill with. And a weekly watcher diffs that table against published provider rates and opens a pull request when something moves, which a human reviews before it ships. Every price also carries a per provider lastVerified date.

How do I compute the cost of a call from the feed?

Cost equals input tokens divided by one million times the input price, plus output tokens divided by one million times the output price. Price cached prompt tokens at the cachedInput rate instead, and for Anthropic add the cacheWrite premium the first time a context is cached. The @weckr/sdk package also exports PRICING, resolvePricing, and calculateCost if you prefer code over arithmetic.

Can I bill my own customers based on this feed?

Treat it as a reference, not a contract. It is accurate to the best of a weekly watched, human reviewed pipeline, but providers are the only authoritative source for their own rates, and some have regional or tiered pricing the feed does not model. Confirm against the provider pricing page before any number reaches an invoice.

Keep reading

Prices are the easy half

A price feed tells you the rate. It cannot tell you which of your customers cost more than they pay, because that depends on who calls what, how often, against which plan. Weckr multiplies these prices by your real traffic, per user and per feature, and flags the accounts that are quietly underwater. Watch it work on the live demo, or start from the AI cost and margin guide.

See the dashboard with real data, no signup needed.

Try the demo →