LLMPrice
A Python Library for LLM Pricing Lookup
Fast, offline-first LLM pricing lookup for 2500+ models across all major providers. Returns both Python objects and JSON.
Data synced daily from LiteLLM via GitHub Actions. Published weekly to PyPI with date-based versioning.
Also available as a TypeScript/npm package.
Install
pip install llmprice-kit
Quick Start
from llmprice import LLMPrice
lp = LLMPrice()
# Get pricing as Python object
model = lp.get("gpt-4o")
print(model.input_cost_per_1m) # 2.5
print(model.output_cost_per_1m) # 10.0
print(model.max_input_tokens) # 128000
print(model.supports_vision) # True
# Get as JSON dict
data = lp.get_json("gpt-4o")
# {"name": "gpt-4o", "provider": "openai", "input_cost_per_1m": 2.5, ...}
# Compare models
models = lp.compare(["gpt-4o", "claude-opus-4-20250514", "gemini/gemini-2.0-flash"])
for m in models:
print(f"{m.name}: ${m.input_cost_per_1m}/1M in, ${m.output_cost_per_1m}/1M out")
# Search by capabilities
cheap_vision = lp.search(supports_vision=True, max_input_price=1.0)
reasoning = lp.search(supports_reasoning=True, provider="anthropic")
# List providers
lp.providers() # ['anthropic', 'openai', 'gemini', ...]
# Auto-update mode (fetches fresh data if >1 day old)
lp = LLMPrice(auto_update=True)
CLI
llmprice get gpt-4o
llmprice compare gpt-4o claude-opus-4-20250514
llmprice search --provider openai --vision
llmprice search --reasoning --max-input-price 5.0
llmprice providers
llmprice update
llmprice info
How It Works
- Bundled data — Ships with a pricing snapshot, works offline with zero latency
- Auto-sync — GitHub repo updated daily from LiteLLM upstream
- Weekly PyPI releases — Published every Monday with date-based version
- Auto-update mode —
LLMPrice(auto_update=True)fetches fresh data when local copy is >1 day old - Dual output — Every query returns Python dataclass objects or JSON dicts
Examples
See examples/python/ for the full interactive notebook.
Data Source
Pricing data from LiteLLM — 2500+ models from 100+ providers including OpenAI, Anthropic, Google, AWS Bedrock, Azure, DeepSeek, Mistral, and more.
License
MIT
Metadata
Release files for llmprice-kit 2026.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llmprice_kit-2026.4.3.tar.gz | 74.0 kB | Without provenance | Details for llmprice_kit-2026.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llmprice_kit-2026.4.3-py3-none-any.whl | Python 3 | none | any | Details for llmprice_kit-2026.4.3-py3-none-any.whl |
Total release size: 150.6 kB
Release files / llmprice_kit-2026.4.3.tar.gz
| Download URL | llmprice_kit-2026.4.3.tar.gz |
|---|---|
| Size | 74.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ccdfa347de5d0b76ee48fe9901927edb25a4bd5914e8fe94ab7fa8bccad923d
|
|
BLAKE2b-256 checksum How to use checksums |
0e583e08c2db4a1e23e395a7336ff27c264b064615185dbd7dff5c567d2fc95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / llmprice_kit-2026.4.3-py3-none-any.whl
| Download URL | llmprice_kit-2026.4.3-py3-none-any.whl |
|---|---|
| Size | 76.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2371946d7ee0011c9166f95e2095adafbdcd746d40352dbe5b466aaf2029b8a9
|
|
BLAKE2b-256 checksum How to use checksums |
d3a06f5408b3a3195439bf0a453d49cd0170f332619938378cce3cc6de901337
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for llmprice-kit 2026.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.