get_model_pricingLABSCO SUMMARY
Baked-in prices are the trade-off, and it is stated openly.
Because the numbers ship with the package, lookups need no key and no network, and they are exactly as current as the version you installed — the project says so and links each provider's pricing page as the source. For choosing a model for a workload that is fine; for reconciling an invoice, check the source. The comparison output prints each model's multiple against the cheapest, which is the fastest way to see how big the decision is: in the project's own example the same workload lands at 6.2x on one model and 34.6x on another.
What it is
A pricing reference that ships its own data. Rather than querying provider pages, the prices are compiled into the package at each release, so a cost comparison is a local lookup and works offline. It is a CLI and Python library first, with an MCP server included.
What you get
- Pricing for one named model —
get_model_pricing - The exact cost of a call given input and output token counts —
calculate_api_cost - The same workload priced across several models side by side, with the multiple against the cheapest —
compare_models - The N cheapest models for your workload —
find_cheapest_models - Every provider with its minimum pricing —
list_providers - Models found by name or filtered by provider —
search_llm_models - Coverage of 277 models across 47 providers, including OpenAI, Anthropic, Google, Mistral, Groq, Cohere, DeepSeek, xAI, Together AI, Fireworks AI, Perplexity, Cerebras, SambaNova, Amazon Bedrock and AI21 Labs
Requirements
No API key at all. Python, and the MCP extra: install from a clone with pip install -e ".[mcp]", which puts the llm-prices-mcp command on your PATH for the client to launch. The README's other routes do not work as written: its PyPI install names llm-prices, which PyPI does not have, and its git-URL and uvx lines put [mcp] inside the URL, where it is read as part of the address rather than as an extra. No other dependencies. Prices are frozen at each release and may drift behind provider changes, so treat a release date as the data's date.
Setup effort
Build from source — git clone https://github.com/benbencodes/llm-prices
USE CASES
Choosing a model for a known workload
Price the same input and output token counts across your shortlist and read the totals rather than doing the arithmetic per provider.
Finding the cheapest option that could do the job
Ask for the cheapest models at your token profile, then check which of them you would actually trust.
Estimating the cost of a feature before building it
Calculate the per-call cost at your expected token counts and multiply by the volume you expect.
Seeing which providers are worth evaluating
List providers with their minimum pricing to spot the ones that could change your economics.
6 tools
Listed in project docs. Your client may show a different list.
calculate_api_costcompare_modelsfind_cheapest_modelslist_providerssearch_llm_modelsBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
- Python 3.8 or later, with pip
- git, to clone the repository
- llm-prices-mcp on PATH (the pip install step puts it there)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/benbencodes/llm-prices
cd llm-prices
pip install -e ".[mcp]"MCP Clients
Claude Desktop
{
"mcpServers": {
"llm-prices": {
"command": "llm-prices-mcp"
}
}
}