@calcis/pricing
v1.0.4
Published
LLM API pricing data for 25+ models. Updated within hours of provider changes.
Maintainers
Readme
@calcis/pricing
Open dataset of LLM API pricing for 25+ models across OpenAI, Anthropic, and Google.
Live pricing for 25+ models, side-by-side comparisons, and a web estimator: https://calcis.dev
- Full price index: https://calcis.dev/models
- Compare models: https://calcis.dev/compare
- API reference: https://calcis.dev/api-docs
Shipped as a single JSON file so you can:
- Vendor it into a build,
- Import it at runtime,
- Use it in a script that doesn't even have Node installed.
The source of truth is the Calcis application's
pricing table. Every row is re-verified against the provider's rate card on
a rolling schedule; the lastUpdated field is the ISO date a human last
confirmed it.
Install
npm install @calcis/pricingUse
// Node / bundler
import pricing from "@calcis/pricing";
for (const m of pricing.models) {
console.log(m.displayName, m.inputPricePerMTok, m.outputPricePerMTok);
}// Fetch directly in the browser
const res = await fetch(
"https://unpkg.com/@calcis/pricing/index.json"
);
const pricing = await res.json();No build step, no dependencies. index.json is the entry point.
Schema
interface PricingFile {
version: string; // semver of the dataset shape
generatedAt: string; // ISO date the file was generated
source: string; // canonical URL for richer data
note: string; // unit + field conventions (human-readable)
models: ModelPricing[];
}
interface ModelPricing {
/** Exact API model id to pass to the provider SDK. */
id: string;
/** Human-friendly name (e.g. "Claude Opus 4.7"). */
displayName: string;
/** "openai" | "anthropic" | "google". */
provider: "openai" | "anthropic" | "google";
/** USD per 1,000,000 input tokens. */
inputPricePerMTok: number;
/** USD per 1,000,000 output tokens. */
outputPricePerMTok: number;
/** Context window in tokens. */
contextWindow: number;
/** Max output tokens per response (omitted when provider doesn't publish). */
maxOutput?: number;
/** ISO date a human last verified the row against the provider. */
lastUpdated: string;
}What's NOT in here (by design)
This package is deliberately the simple case: base input / output prices and context window. It does not ship:
- Cached-input pricing (OpenAI + Gemini)
- Anthropic cache-write pricing
- Gemini long-context surcharge tiers
- Tokenizer identity or multipliers
- Batch / async discounts
Those live in the full Calcis app where they can be modelled against the cost estimator. If you have a use case that needs them as a dataset too, open an issue.
License
MIT. See LICENSE.
Sources
Canonical rate cards the data is derived from:
- Anthropic: https://platform.claude.com/docs/en/about-claude/models/overview
- Google Gemini: https://ai.google.dev/gemini-api/docs/pricing
- OpenAI: https://developers.openai.com/api/docs/models
Links
- Website: https://www.calcis.dev
- Upstream repo: https://github.com/rc397/Calcis
- Full estimator package:
@calcis/cost-estimator
