Fast, offline-first LLM pricing lookup with auto-sync from LiteLLM data. Get token costs, context windows, and capabilities for 2500+ models.
Project description
LLMPrice
Fast, offline-first LLM pricing lookup for 2500+ models across all major providers. Returns both Python objects and JSON.
Auto-synced daily from LiteLLM pricing data via GitHub Actions. Date-based versioning (2026.4.2).
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
# Get model pricing
llmprice get gpt-4o
# Compare models
llmprice compare gpt-4o claude-opus-4-20250514
# Search with filters
llmprice search --provider openai --vision
llmprice search --reasoning --max-input-price 5.0
# List providers
llmprice providers
# Update data
llmprice update
# Check data freshness
llmprice info
How It Works
- Bundled data: Ships with a snapshot of pricing data — works offline, zero latency
- Auto-sync: Optional background refresh from LiteLLM's upstream JSON
- Date versioning: Each release is tagged by date (e.g.,
2026.4.2), sopip install llmprice-kit==2026.4.2gives you that exact day's pricing - GitHub Actions: Runs daily, checks for upstream changes, auto-publishes to PyPI
Data Source
Pricing data sourced from LiteLLM's model_prices_and_context_window.json, which covers 2500+ models from 15+ providers including OpenAI, Anthropic, Google, AWS Bedrock, Azure, DeepSeek, Mistral, and more.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmprice_kit-2026.4.2.tar.gz.
File metadata
- Download URL: llmprice_kit-2026.4.2.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08321bd19899f5a31eb6b69e78ef2e6493199928da24347af4ead74fa51be354
|
|
| MD5 |
724d2ab92e591155e08a60e8b061ffce
|
|
| BLAKE2b-256 |
8eedfc23a4166af8bc96c57a8e926bfe39e1a13582bc79643c38145711ef679f
|
File details
Details for the file llmprice_kit-2026.4.2-py3-none-any.whl.
File metadata
- Download URL: llmprice_kit-2026.4.2-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53eac3246b80906412bcaa632a9e18795be30ff0cd5446b4fb153738fbf91b27
|
|
| MD5 |
255c97714013098006361735bd30084b
|
|
| BLAKE2b-256 |
f518507cc9f2307343053babe77273f7d6a61f47ac77e44bdb85c67ea1485565
|