datafloe Get a key

Provenance record

LLM API pricing, rate limits & context windows

Where every row came from — source, original license, transformations, and redistribution basis, recorded before the API went live.

llm-api-pricing

Dataset slug: llm-api-pricing Status: LIVE (daily refresh — ADR-013)

First-party compilation of public LLM API pricing. Prices, context windows, and model names are facts published by each provider; facts are not copyrightable. Current prices are a free commodity (llm-prices.com, pricepertoken, genai-prices all publish them), so we open the current snapshot and sell what competitors don't have: verified append-only price history, freshness/validation guarantees, provenance, and commercial support.

Source

  • Primary compilation basis: provider pricing/documentation pages (OpenAI, Anthropic, Google, Mistral, xAI, DeepSeek, Cohere, Groq, Perplexity, AI21).
  • Machine-readable ingestion source: the litellm open pricing dataset — model_prices_and_context_window.json (https://github.com/BerriAI/litellm), MIT-licensed, a maintained aggregation of those same public provider prices.
    • Why via litellm, not scraping provider HTML: provider pricing pages are JS-rendered and change shape frequently; a weekly auto-scrape of them is fragile. litellm gives a stable, machine-readable feed of the same public facts, keeping the refresh reliable. The >50% price-move validation gate guards against upstream errors.
  • Retrieved: 2026-07-13 (re-fetched each weekly refresh).

License / redistribution basis

Rights are split in two (decided 2026-07-14, resolving the p0-review blocker that a keyless full-table export contradicted a redistribution-forbidden license):

  • CURRENT snapshot — CC BY 4.0 (open). The llm_pricing table as served by the keyless /sample and /genai-prices.json exports, plus the Hugging Face sample extracts, are CC BY 4.0: free to use and redistribute with attribution (datafloe.dev/llm-pricing). Current prices are public facts and a free commodity; opening the snapshot is the distribution play, and the attribution requirement turns every reuse into a backlink.
  • HISTORY + live keyed API — commercial-api@1 ($29/mo). The append-only llm_pricing_history table's guarantees and the keyed live API stay commercial: $29/mo buys verified price history, freshness/validation guarantees, provenance, and commercial support — not raw-row exclusivity. (The keyless /history browse endpoint stays open for the public tracker page; depth-gating is pointless while history is sparse — revisit at ~6 months.)
  • Ingestion source license: litellm is MIT (permits use/redistribution with notice). We consume it as a data feed, not as bundled code.
  • ai_training: false on both profiles by platform design (07 §6).

Transformations applied (ingest/sources/llm-pricing.ts)

  1. Provider allowlist. Kept only primary model providers' direct API pricing (see PROVIDERS map). Excluded resellers/aggregators (fireworks, openrouter, novita, deepinfra, replicate, vercel_ai_gateway, together_ai, oci) and per-region cloud mirrors (bedrock*, azure*, vertex_ai*) so there is one clean price per model per maker.
  2. Chat models only. mode == "chat" with both input and output token prices present. Embedding/image/audio/rerank rows dropped.
  3. Unit conversion. input_cost_per_token/output_cost_per_tokeninput_per_mtok/output_per_mtok (× 1e6), 4 dp.
  4. Context window = max_input_tokens (fallback max_tokens). rate_limit_rpm = rpm when the source provides it, else NULL (most models omit it).
  5. updated_at = the compile/refresh date.

Freshness

  • Cadence: daily. Refresh cron: 06:00 UTC every day (prices move fast; the staleness window follows automatically at 2× cadence).
  • Refresh path: ingest/refresh-llm-api-pricing.ts → validation gates → (on pass) a cross-source spot check → apply to prod D1 → dataset_meta.last_refreshed updated. Snapshot committed as audit trail.
  • Validation gates (a hold = no prod write + Actions failure email):
    1. Schema match + row-count floor 150 + drop/growth bounds.
    2. Any model's output price moving >50% vs the last snapshot holds the batch (unit error).
    3. Per-provider guard: any previously-present provider dropping to 0 rows or losing >50% of its models holds the batch (catches a silent upstream litellm_provider rename that the global gate would miss).
    4. Cross-source spot check: flagship prices are compared against a second independent aggregator (pydantic/genai-prices); a >5% disagreement on any flagship holds the batch with a diff report. (An external outage skips the check, never holds.)
  • New-provider visibility (no hold): each refresh logs any genuinely-new upstream maker (not a known host/mirror) to the Actions summary, so new providers get consciously allowlisted rather than silently dropped.
  • Price history: after a passing refresh, one llm_pricing_history row is appended per model whose input/output price changed. A model that disappears from the feed gets one tombstone row (NULL prices) — disappearance is a data point, not silence.

Date semantics

effective_date on a history row = the date the price was observed at refresh (daily granularity; source lag is possible), not the provider's announcement date. It marks when datafloe verified the price, which is the guarantee we sell.

Coverage

  • Rows: 319 · Providers: 10 (OpenAI, Anthropic, Google, Mistral, xAI, DeepSeek, Cohere, Groq, Perplexity, AI21).
  • Prices in USD per million tokens; context windows in tokens.

Note

Survives "where did you get this?": every price is a public provider fact, the ingestion feed is MIT, and we assert no ownership over the prices. The open CC BY snapshot says so out loud; the paid product is the verified history and freshness guarantees, cross-checked against a second aggregator — not exclusivity over public numbers. This is the license-hygiene story done deliberately.