🐍 🏠 - Zero-dependency Python CLI, library, and MCP server for calculating and comparing LLM API costs across…
llm-prices
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Website & Blog** · **GitHub** · **Changelog**
A zero-dependency Python CLI and library for looking up and comparing LLM API
costs across all major providers.
Covers **277 models across 47 providers**: OpenAI, Anthropic, Google, Mistral,
Groq, Cohere, DeepSeek, xAI, Together AI, Fireworks AI, Perplexity, Cerebras,
SambaNova, Amazon Bedrock, AI21 Labs, DeepInfra, Lambda AI, Novita AI, Nebius AI,
Moonshot AI (Kimi K2), Hyperbolic, Crusoe, Qwen/Alibaba Cloud, Microsoft Azure,
Inflection AI, NVIDIA NIM, NousResearch, ZhipuAI, MiniMax, IBM, ByteDance, Baidu,
Xiaomi, Z.AI, Tencent, Arcee AI, InclusionAI, StepFun, Reka, Morph, Perceptron.
No API key required — pricing data is baked in and updated with each release.
**Also available as an MCP server** — use llm-prices tools directly from Claude, Cursor, and other MCP-compatible AI assistants.
---
Install
**pipx (recommended — installs globally, no venv required):**
**Homebrew (macOS/Linux):**
**pip (PyPI):**
**From source:**
Requires Python 3.8+. No other dependencies.
---
Usage
List all models
**Export as Markdown table** (for READMEs, docs, PRs):
**Export as CSV** (for spreadsheets, databases):
Calculate cost for a specific call
JSON output for scripting:
Compare models side-by-side
Find the cheapest models for your workload
Filter to a single provider, or get a Markdown table:
How many calls fit in a budget?
What's new? Recently added models
Use as a Python library
---
Providers & model count
| Provider | Models | Notes |
|-------------|--------|----------------------------------|
| OpenAI | 13 | GPT-4o, GPT-4.1, o1, o3, o4 |
| Anthropic | 8 | Claude 4, 3.7, 3.5, 3 |
| Google | 6 | Gemini 2.5, 2.0, 1.5 |
| Together AI | 7 | Qwen3, Kimi K2, Llama, DeepSeek |
| Fireworks | 6 | DeepSeek V4 Pro, V3, Kimi, Llama |
| Groq | 9 | Llama 4, Llama 3.x, Kimi K2, Qwen3 32B, gpt-oss 120B/20B |
| Mistral | 12 | Large 3, Magistral Medium/Small (reasoning), Medium 3, Small 3.2, Codestral, Devstral |
| Cohere | 3 | Command R+, R, R7B |
| Perplexity | 4 | Sonar, Sonar Pro, Reasoning, Deep Research |
| DeepSeek | 3 | chat (V3), V3.2, reasoner (R1) |
| xAI | 8 | Grok-4.3, Grok-4.20, Grok-4, Grok-4.1-fast, Grok-code-fast, Grok-3, Grok-3-mini, Grok-3-mini-fast |
| Cerebras | 3 | Llama 3.3 70B, Llama 3.1 8B, Qwen3 32B — ultra-fast silicon |
| SambaNova | 5 | Llama 4 Maverick, Llama 3.3 70B, DeepSeek-V3, MiniMax M2.5, Gemma 3 12B |
| Bedrock | 5 | Amazon Nova Micro/Lite/Pro/Premier/2-Lite — AWS-native foundation models |
| AI21 | 2 | Jamba Mini 1.7, Jamba Large 1.7 — 256k ctx, hybrid SSM+Transformer |
| DeepInfra | 4 | Llama 4 Maverick (1M ctx!), Scout, DeepSeek-R1-0528, QwQ-32B |
| Lambda AI | 4 | Llama 4 Maverick ($0.05/Mtok — cheapest!), Scout, Llama 3.3 70B, DeepSeek-R1 |
| Novita AI | 4 | Llama 4 Maverick (1M ctx), Scout, DeepSeek-R1-0528, Qwen3 235B |
| Nebius AI | 5 | Llama 3.1 8B ($0.02/Mtok — cheapest!), Llama 3.3 70B, Qwen3 235B (262k ctx), Nemotron 253B, DeepSeek-R1-0528 |
---
Pricing data
Prices are baked into the package at each release date and may drift behind
provider changes. Check the sources for the latest. PRs updating
llm_prices/data.py are welcome — please cite your source.