Calculate prices for calling LLM inference APIs.
Python
386
510 commits
updated Sep 30, 2026
The following providers are currently supported:
See the Python README for instructions on how to install and use the Python package and CLI.
See the JS/TS README for instructions on how to install and use the JavaScript/TypeScript package and CLI.
See the Go README for instructions on how to install and use the Go package.
Price data is available in the following files:
prices/new_data/v2/data.json - current generated pricing data for packages that bundle the static unit registryprices/new_data/v2/data.schema.json - JSON Schema for the full v2 dataprices/new_data/v2/data_slim.json - compact v2 pricing data with free models and long metadata removedprices/new_data/v2/data_slim.schema.json - JSON Schema for the slim v2 dataThe v1 files below are frozen: they remain available so released clients keep working, but they no longer receive provider, model or price updates. Use the v2 files above for anything new.
prices/data.json - frozen v1-compatible provider and model pricing dataprices/data.schema.json - JSON Schema published alongside frozen v1 data.jsonprices/data_slim.json - frozen slim v1-compatible data with long fields and free models removedprices/data_slim.schema.json - JSON Schema published alongside frozen v1 data_slim.jsonFeel free to download these files and use them as you wish. We would be grateful if you would reference this project wherever you use it and contribute back to the project if you find any errors.
Coming soon...
This project is a best effort from Pydantic and the community to provide an indicative estimate of the price you might pay for calling an LLM.
The price data cannot be exactly correct because model providers do not provide exact price information for their APIs in a format which can be reliably processed.
If you get a bill you weren't expecting, don't blame us!
If you're a lawyer, please read the LICENSE under which this project is developed, hosted and distributed.
If you're a developer, please contribute to fix any missing or incorrect prices you find.
We welcome contributions from the community and especially model/inference providers!
If you're a model provider: it would be amazing if you would serve a JSON file or API endpoint with pricing information which we could pull from. You would be the first AFAIK, and I think it would dramatically improve the experience for developers using your API!
Otherwise, to contribute:
prices/README.md for instructions on how to contribute to the price data.benchmarks/README.md for the pricing performance benchmark workflow.The Pydantic Stack is everything you need to ship production-grade AI agents:
This project would not be possible without the following existing data sources:
While none of these sources had exactly what we needed (hence creating this project), they (especially helicone) were used to populate some of the initial price database, and we continue to pull price updates from them.
Thanks to all those projects!
190 followers · starred Dec 2025
8 followers · starred Aug 2025
157 followers · starred Jun 2026
10 followers · starred Oct 2025
Python
68.8%
TypeScript
22.9%
Go
7.6%
Calculate prices for calling LLM inference APIs.
Python
386
510 commits
updated Sep 30, 2026
The following providers are currently supported:
See the Python README for instructions on how to install and use the Python package and CLI.
See the JS/TS README for instructions on how to install and use the JavaScript/TypeScript package and CLI.
See the Go README for instructions on how to install and use the Go package.
Price data is available in the following files:
prices/new_data/v2/data.json - current generated pricing data for packages that bundle the static unit registryprices/new_data/v2/data.schema.json - JSON Schema for the full v2 dataprices/new_data/v2/data_slim.json - compact v2 pricing data with free models and long metadata removedprices/new_data/v2/data_slim.schema.json - JSON Schema for the slim v2 dataThe v1 files below are frozen: they remain available so released clients keep working, but they no longer receive provider, model or price updates. Use the v2 files above for anything new.
prices/data.json - frozen v1-compatible provider and model pricing dataprices/data.schema.json - JSON Schema published alongside frozen v1 data.jsonprices/data_slim.json - frozen slim v1-compatible data with long fields and free models removedprices/data_slim.schema.json - JSON Schema published alongside frozen v1 data_slim.jsonFeel free to download these files and use them as you wish. We would be grateful if you would reference this project wherever you use it and contribute back to the project if you find any errors.
Coming soon...
This project is a best effort from Pydantic and the community to provide an indicative estimate of the price you might pay for calling an LLM.
The price data cannot be exactly correct because model providers do not provide exact price information for their APIs in a format which can be reliably processed.
If you get a bill you weren't expecting, don't blame us!
If you're a lawyer, please read the LICENSE under which this project is developed, hosted and distributed.
If you're a developer, please contribute to fix any missing or incorrect prices you find.
We welcome contributions from the community and especially model/inference providers!
If you're a model provider: it would be amazing if you would serve a JSON file or API endpoint with pricing information which we could pull from. You would be the first AFAIK, and I think it would dramatically improve the experience for developers using your API!
Otherwise, to contribute:
prices/README.md for instructions on how to contribute to the price data.benchmarks/README.md for the pricing performance benchmark workflow.The Pydantic Stack is everything you need to ship production-grade AI agents:
This project would not be possible without the following existing data sources:
While none of these sources had exactly what we needed (hence creating this project), they (especially helicone) were used to populate some of the initial price database, and we continue to pull price updates from them.
Thanks to all those projects!
190 followers · starred Dec 2025
8 followers · starred Aug 2025
157 followers · starred Jun 2026
10 followers · starred Oct 2025
Python
68.8%
TypeScript
22.9%
Go
7.6%