NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #622 most downloaded on PyPI
Calculate prices for calling LLM inference APIs.
Latest stable
0.2.3
Last release 12 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
78 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
Price Anthropic fast mode for Claude Fable 5.2, Mythos 5.2, Opus 5.5, Opus 5 and Opus 4.8 by @dsfaccini in https://github.com/pydantic/genai-prices/pu
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.2.2...v0.2.3
Read the Baseten catalog table past its component prelude by @Kludex in https://github.com/pydantic/genai-prices/pull/898
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.2.1...v0.2.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Expose the Rust crate's catalog and publish it on release
Expose the Rust crate's catalog and publish it on release (#901)
The native Rust crate now ships with every release, with the same price data as the Python and JavaScript packages. It also gains a read-only catalog, so you can list what the data covers without pricing a call.
cargo add genai-prices@0.2.1
genai-prices through trusted publishing, and the tag sets the version.Calculator::providers and Calculator::find_provider return each provider's ID, name, models and supported API flavors. Each model has its ID, name and context window.Calculator::from_json now rejects a non-string model name or an invalid context_window, and the error names the model.The Python, JavaScript and Go packages have no functional changes in this release.
Full changelog: v0.2.0...v0.2.1
This release bundles a much larger and fresher price database. Prices now come from hourly importers that read each provider's own pricing pages, so t
This release bundles a much larger and fresher price database. Prices now come from hourly importers that read each provider's own pricing pages, so the bundled data covers 460 more models than v0.1.13 and keeps dated history for every rate change.
pip install genai-prices==0.2.0
npm install @pydantic/genai-prices@0.2.0
price_variants that are a fixed share of it get a matching dated entry instead of going stale.mixtral-8x22b-instruct and mistral-small-3.2-24b-instruct now match Mistral's own prices, Grok 4.20 has its 2026-04-30 price cut, and mistral-small-latest uses Mistral Small 4 rates from 2026-03-16.elevenlabs provider prices eleven_realtime_v1_max and eleven_realtime_v1_mini as connected audio time plus tokens.extract_usage reads xAI Responses API bodies, including cached input and reasoning tokens.perplexity/sonar charges $2.50 per thousand searches. Pass price_context={'search_type': 'fast'} for the $1 Fast Search rate.requires-python is now >=3.11. Python 3.15 is supported and tested. Pin genai-prices<0.2 if you still run on 3.10.packages/rust ports the pricing engine with the v2 data bundled, at parity with the Python reference. It is not on crates.io yet.Full changelog: v0.1.13...v0.2.0
Co-authored-by: genai-prices-automation[bot] <genai-prices-automation[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski marcelotryle@gmail.com
Run Price Check hourly on Pacific weekdays with GLM 5.3 Flash
Run Price Check hourly on Pacific weekdays with GLM 5.3 Flash (#789)
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.12...v0.1.13
Add batch API pricing for Anthropic, OpenAI, Google, Mistral, Groq an…
Add batch API pricing for Anthropic, OpenAI, Google, Mistral, Groq an…
in. inference profiles for Claude Haiku 4.5, Opus 5 and Sonnet 5 by @kimnamu in https://github.com/pydantic/genai-prices/pull/780Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.11...v0.1.12
Add explicit OpenAI service-tier pricing across all packages
Add explicit OpenAI service-tier pricing across all packages (#772)
cacheDetails by @jviehhauser in https://github.com/pydantic/genai-prices/pull/752Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.10...v0.1.11
Add OpenAI Decisions pricing
Add OpenAI Decisions pricing (#768)
google/gemini-3.8-flash pricing by @niallmci in https://github.com/pydantic/genai-prices/pull/716gpt-6.1-sol pricing and match OpenRouter's dated gpt-6.1-sol-pro slug by @dsfaccini in https://github.com/pydantic/genai-prices/pull/736gpt-6.1-sol pricing by @jamesmdavies88 in https://github.com/pydantic/genai-prices/pull/743pydantic-ai engine with GLM 5.3 Flash by @dsfaccini in https://github.com/pydantic/genai-prices/pull/760Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.9...v0.1.10
Price one-hour Claude cache writes on Bedrock and Vertex AI, and drop…
Price one-hour Claude cache writes on Bedrock and Vertex AI, and drop…
gpt-live-1 pricing by @DouweM in https://github.com/pydantic/genai-prices/pull/719context_window by @DouweM in https://github.com/pydantic/genai-prices/pull/720Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.8...v0.1.9
Add Claude Opus 5.5 pricing
Add Claude Opus 5.5 pricing (#709)
gpt-6-sol and gpt-6-luna pricing by @DouweM in https://github.com/pydantic/genai-prices/pull/708Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.7...v0.1.8
Split AWS GPT-5.6 (Luna, Sol, Terra) prices into global and regional …
Split AWS GPT-5.6 (Luna, Sol, Terra) prices into global and regional …
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.6...v0.1.7
Share one background price updater across UpdatePrices instances (#…
Share one background price updater across UpdatePrices instances (#…
UpdatePrices instances by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/404Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.5...v0.1.6
Refresh Cerebras provider: add Gemma 4 31B and GLM 4.7, deprecate delisted models by @ayaangazali in https://github.com/pydantic/genai-prices/pull/469
claude-opus-4-6 and claude-sonnet-4-5 by @xyzs996 in https://github.com/pydantic/genai-prices/pull/585openrouter record context windows from the OpenRouter API by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/641azure record context windows from Microsoft's model docs by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/652perplexity record context windows from Perplexity's model cards by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/655x-ai record context windows from xAI's model docs by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/654deepseek record context windows from DeepSeek's API docs by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/653Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.4...v0.1.5
Support fractional usage values by @alexmojaki in https://github.com/pydantic/genai-prices/pull/568
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.3...v0.1.4
Add Gemini 3.7 Flash pricing and correct Gemini 3.6 Flash rates by @dsfaccini in https://github.com/pydantic/genai-prices/pull/564
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.2...v0.1.3
Add Z.AI GLM-5.2 pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/551
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.1...v0.1.2
Update OpenAI gpt-5.6 family prices (terra & luna reduced) by @dsfaccini in https://github.com/pydantic/genai-prices/pull/531
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.1.0...v0.1.1
feat: publish v2 pricing data and freeze v1 by @alexmojaki in https://github.com/pydantic/genai-prices/pull/512
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.73...v0.1.0
Ignore generated price JSON in reviews by @dsfaccini in https://github.com/pydantic/genai-prices/pull/499
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.72...v0.0.73
feat(openai): add GPT-5.6 cache write pricing by @Wh1isper in https://github.com/pydantic/genai-prices/pull/463
kimi-k3) pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/467Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.71...v0.0.72
chore: gitignore .env by @dsfaccini in https://github.com/pydantic/genai-prices/pull/458
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.70...v0.0.71
Update AWS Anthropic's opus and sonnet 4.6 pricing that no longer use tiered pricing by @XG-xin in https://github.com/pydantic/genai-prices/pull/428
tokens api_flavor for raw token extraction by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/453Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.69...v0.0.70
Map Mistral cached_tokens to cache_read_tokens by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/444
cached_tokens to cache_read_tokens by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/444Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.68...v0.0.69
Add 4 new Fireworks models (June 2026) by @jlegewie in https://github.com/pydantic/genai-prices/pull/420
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.67...v0.0.68
Add amazon nova 2 pricing by @XG-xin in https://github.com/pydantic/genai-prices/pull/405
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.66...v0.0.67
Add Claude Fable 5 pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/399
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.65...v0.0.66
refactor: make typescript match logic case insensitive by @ddanielcruzz in https://github.com/pydantic/genai-prices/pull/396
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.64...v0.0.65
chore: add Doubleword as a provider by @ddanielcruzz in https://github.com/pydantic/genai-prices/pull/394
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.63...v0.0.64
Add Claude Opus 4.8 pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/389
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.62...v0.0.63
feat: add Gemini 3.5 Flash pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/379
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.61...v0.0.62
chore: update gpt-5.5 aliases by @ddanielcruzz in https://github.com/pydantic/genai-prices/pull/376
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.60...v0.0.61
Introduce zizmor by @Viicos in https://github.com/pydantic/genai-prices/pull/362
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.59...v0.0.60
Add OpenRouter date-suffixed Claude 4.5 model aliases by @nirnaim in https://github.com/pydantic/genai-prices/pull/319
_background_task alive to update_prices after failed attempts by @adtyavrdhn in https://github.com/pydantic/genai-prices/pull/323Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.56...v0.0.59
Nothing published for this version
feat: add gpt-5.3-codex pricing by @sigglep in https://github.com/pydantic/genai-prices/pull/301
-v1) and/or regional prefix (e.g. us.anthropic) by @alexmojaki in https://github.com/pydantic/genai-prices/pull/306Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.55...v0.0.56
Loosen AWS model matchers to support inference profiles by @alexmojaki in https://github.com/pydantic/genai-prices/pull/292
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.54...v0.0.55
feat: add model lifecycle management (deprecated & removed) by @Kludex in https://github.com/pydantic/genai-prices/pull/284
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.53...v0.0.54
feat: add Claude Opus 4.6 pricing by @dsfaccini in https://github.com/pydantic/genai-prices/pull/277
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.52...v0.0.53
Add Python tests for model fallback matching by @Copilot in https://github.com/pydantic/genai-prices/pull/263
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.51...v0.0.52
Update js sdk docs with custom provider instructions by @saeedesmaili in https://github.com/pydantic/genai-prices/pull/257
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.50...v0.0.51
add prices for gemini 3 flash and pro image preview by @dsfaccini in https://github.com/pydantic/genai-prices/pull/254
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.49...v0.0.50
feat: add Qwen3-Coder-480B-A35B-Instruct model with pricing details by @iyehuda in https://github.com/pydantic/genai-prices/pull/248
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.48...v0.0.49
fix: broken link to openrouter in readme by @juanfabrega in https://github.com/pydantic/genai-prices/pull/227
__add__ method for easy usage accumulation when streaming by @monkeyusage in https://github.com/pydantic/genai-prices/pull/234eval-type-backport Python version constraint by @Viicos in https://github.com/pydantic/genai-prices/pull/238Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.47...v0.0.48
chore(*): soften httpx python dependency by @forforeach in https://github.com/pydantic/genai-prices/pull/226
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.46...v0.0.47
Update huggingface prices by @alexmojaki in https://github.com/pydantic/genai-prices/pull/222
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.45...v0.0.46
Huggingface prices by @alexmojaki in https://github.com/pydantic/genai-prices/pull/218
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.44...v0.0.45
feat(azure): add extractors by @Kludex in https://github.com/pydantic/genai-prices/pull/216
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.43...v0.0.44
AWS Anthropic model prices by @alexmojaki in https://github.com/pydantic/genai-prices/pull/211
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.42...v0.0.43
Add AWS prices from API by @alexmojaki in https://github.com/pydantic/genai-prices/pull/208
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.41...v0.0.42
Add Gemini 3.0 by @samuelcolvin in https://github.com/pydantic/genai-prices/pull/206
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.40...v0.0.41
Account for toolUsePromptTokenCount in google models by @alexmojaki in https://github.com/pydantic/genai-prices/pull/200
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.39...v0.0.40
Groq prices fixes by @alexmojaki in https://github.com/pydantic/genai-prices/pull/194
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.38...v0.0.39
Support failure mode for updatePrices factory by @petyosi in https://github.com/pydantic/genai-prices/pull/192
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.37...v0.0.38
feat(openrouter): add deepseek models that were missing by @lironesamoun in https://github.com/pydantic/genai-prices/pull/172
price_discrepancies.py directly from PyCharm by @alexmojaki in https://github.com/pydantic/genai-prices/pull/182Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.36...v0.0.37
Extend OpenRouter support for Google Gemini 2.5 models by @lionpeloux in https://github.com/pydantic/genai-prices/pull/160
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.35...v0.0.36
Update simonw llm-prices url by @Kludex in https://github.com/pydantic/genai-prices/pull/168
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.34...v0.0.35
prices for claude haiku 4.5 by @pedrurrego in https://github.com/pydantic/genai-prices/pull/165
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.33...v0.0.34
fix: add audio field on OpenRouter script by @Kludex in https://github.com/pydantic/genai-prices/pull/162
audio field on OpenRouter script by @Kludex in https://github.com/pydantic/genai-prices/pull/162Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.32...v0.0.33
feat(aws): extract prices on AWS Bedrock models by @Kludex in https://github.com/pydantic/genai-prices/pull/158
Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.31...v0.0.32
Extract OpenAI input_audio_tokens by @alexmojaki in https://github.com/pydantic/genai-prices/pull/155
input_audio_tokens by @alexmojaki in https://github.com/pydantic/genai-prices/pull/155Full Changelog: https://github.com/pydantic/genai-prices/compare/v0.0.30...v0.0.31
One column per month.