Documentation
CLI Reference
Complete guide to all llm-cost commands and options.
Installation
Install llmprices via pip:
pip install llmpricesVerify installation:
llm-cost --versionllm-cost list
List all available models and their prices.
Usage
llm-cost list [OPTIONS]Options
Examples
llm-cost listllm-cost list --provider openaillm-cost list --sort output --tier budgetllm-cost list --search geminillm-cost calc
Calculate cost for a prompt and find the cheapest models.
Usage
llm-cost calc [PROMPT] [OPTIONS]Arguments
Options
Examples
llm-cost calc "Build a Python REST API" --output 800llm-cost calc --input 1000 --output 500 --top 5llm-cost calc "Hello world" --provider anthropicllm-cost calc --input 2000 --output 1000 --tier flagshipllm-cost calc --input 1000 --output 500 --sort valuellm-cost compare
Compare specific models side by side.
Usage
llm-cost compare MODEL1 MODEL2 [MODEL3...] [OPTIONS]Arguments
Options
Examples
llm-cost compare gpt-5 o3 gemini-2-5-prollm-cost compare claude-opus-4-6 gpt-5 --input 2000 --output 1000llm-cost compare gpt-5-4-nano mistral-small-3-2 --prompt "Hello world"llm-cost providers
List all supported providers and their models.
Usage
llm-cost providersExamples
llm-cost providersEfficiency Tiers
Models are categorized into four efficiency tiers based on their capabilities and pricing:
Most capable models with advanced reasoning and largest context windows. Highest cost.
Examples: Claude Opus 4.6, GPT-5, Gemini 2.5 Pro
High-performance models with strong reasoning capabilities. Balanced cost-performance.
Examples: o4 Mini, Claude Sonnet 4.6
General-purpose models suitable for most tasks. Moderate pricing.
Examples: GPT-5.4 Mini, Mistral Large 3
Fast, cost-effective models for simple tasks and high-volume use cases.
Examples: GPT-5.4 Nano, DeepSeek V4 Flash, Mistral Small 3.2
Tips & Tricks
Finding the right model
- Use
--tier budgetfor high-volume, simple tasks - Use
--tier flagshipfor complex reasoning and analysis - Use
--sort valueto find the best cost-performance ratio
Token estimation
- Provide a sample prompt to get automatic token estimation
- Use
--inputfor precise control when you know exact token counts - Rule of thumb: ~1.3 tokens per word for English text
Filtering results
- Combine
--providerand--tierto narrow down options - Use
--searchto quickly find models by name - Adjust
--topto see more or fewer results