AI-Cost-CLI & MCP
v1.3.0AI API cost calculator, budget estimator & MCP server.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_ai_models
List AI models and their effective pricing across text, image, video, audio, and gateway providers. Supports curated flagship models plus optional 400+ live OpenRouter catalog.
| Parameter | Type | Description |
|---|---|---|
currency | string | Target currency code (e.g., 'USD', 'TRY', 'EUR', 'GBP'). Defaults to 'USD'. |
include_legacy | boolean | Include older/superseded models tagged as legacy (default: false) |
include_live | boolean | Include 400+ live models from OpenRouter catalog (default: false) |
model_type | string | Filter by modality/model type |
provider | string | Filter by provider name (e.g., 'OpenAI', 'Anthropic', 'Google', 'xAI', 'DeepSeek', 'Meta', 'Mistral', 'OpenRouter') |
tag | string | Filter by capability tag (e.g., 'coding', 'cheap', 'fast', 'agentic', 'vision', 'reasoning', 'long-context') |
calculate_ai_cost
Calculate the exact cost of an AI API call with full base cost, prompt-caching, batch discount, and aggregator platform fee breakdown. Supports 60+ curated models and 400+ live OpenRouter models.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model ID or alias (e.g., 'gpt-6.2-astra', 'claude-opus-5.5', 'gemini-4-carbon', 'grok-4.7', 'deepseek-v4.1-flash', 'veo-3.1') |
batch | boolean | Apply Batch API discount if supported (default: false) |
cached_input_tokens | integer | Cached input tokens billed at cache-read rate |
currency | string | Target currency code (default: 'USD') |
input_tokens | integer | Uncached input tokens (for text models) |
output_tokens | integer | Output completion tokens (for text models) |
units | number | Number of units for non-text models (images, seconds, minutes, songs, clips, 1M chars, or months) |
get_ai_cost
Alias for calculate_ai_cost: calculate the cost of an AI model usage based on tokens or units.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model ID or alias (e.g., 'gpt-6.2-astra', 'claude-opus-5.5', 'gemini-4-carbon', 'grok-4.7', 'deepseek-v4.1-flash', 'veo-3.1') |
batch | boolean | Apply Batch API discount if supported (default: false) |
cached_input_tokens | integer | Cached input tokens billed at cache-read rate |
currency | string | Target currency code (default: 'USD') |
input_tokens | integer | Uncached input tokens (for text models) |
output_tokens | integer | Output completion tokens (for text models) |
units | number | Number of units for non-text models (images, seconds, minutes, songs, clips, 1M chars, or months) |
compare_ai_models
Compare two or more AI models side-by-side on pricing, platform fees, context window, and optional sample workload cost.
| Parameter | Type | Description |
|---|---|---|
currency | string | Target currency code (default: 'USD') |
input_tokens | integer | Optional sample input tokens to compare actual call cost |
model_id_1 | string | First model ID (legacy 2-model parameter) |
model_id_2 | string | Second model ID (legacy 2-model parameter) |
model_ids | array | List of two or more model IDs to compare (e.g., ['gpt-6.2-astra', 'claude-opus-5.5', 'gemini-4-neon']) |
output_tokens | integer | Optional sample output tokens to compare actual call cost |
units | number | Optional sample units to compare non-text call cost |
recommend_ai_model
Recommend the best cost-effective AI models for a task description. Supports keywords like 'coding', 'cheap', 'fast', 'agentic', 'vision', 'reasoning', 'video', 'image', 'music'.
| Parameter | Type | Description |
|---|---|---|
task_description * | string | Description of the workload or task |
currency | string | Target currency code (default: 'USD') |
include_legacy | boolean | Include legacy models (default: false) |
limit | integer | Maximum number of recommendations (default: 3) |
max_input_cost | number | Optional maximum USD cost per 1M input tokens (or per unit) |
model_type | string | Optional modality filter |
estimate_monthly_cost
Estimate daily, monthly, and annual AI API costs for a recurring production workload.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model ID or alias (e.g., 'gpt-6.2-sol', 'claude-sonnet-5.5') |
requests_per_day * | number | Average requests per day |
avg_cached_input_tokens | integer | Average cached input tokens per request |
avg_input_tokens | integer | Average uncached input tokens per request |
avg_output_tokens | integer | Average output tokens per request |
avg_units | number | Average units per request (for non-text models) |
batch | boolean | Whether requests use Batch API (default: false) |
currency | string | Target currency code (default: 'USD') |
days | integer | Days in billing cycle (default: 30) |
get_pricing_metadata
Get metadata about the current pricing database (schema version, model count, live catalog count, last update date, currency cache timestamp).
sync_pricing_data
Fetch the latest curated pricing database, refresh 400+ live OpenRouter models, and update currency exchange rates.