Calculate monthly API cost
calculate_api_costCalculates monthly and yearly LLM API costs from tokens per request, requests per day, and cache hit rate, then lists cheaper alternative models for the same workload.
Instructions
Calculates what an LLM API workload costs per month and per year from input/output tokens per request, requests per day and the share of input served from cache, and names the cheapest alternatives for the same workload. Mirrors https://aicostdesk.com/llm-api-calculator.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>"
},
"name": "calculate_api_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model id or name, e.g. "gpt-6.2-sol" or "Claude Sonnet 5.5". | |
| alternatives | No | How many cheaper alternative models to show. Default 3. | |
| input_tokens | No | Input tokens per request. Default 1500. | |
| output_tokens | No | Output tokens per request. Default 500. | |
| cache_hit_rate | No | Share of input tokens served from prompt cache, 0-1 (0.9) or percent (90). Default 0. | |
| days_per_month | No | Billing days per month. Default 30. | |
| requests_per_day | No | Requests (or messages, jobs) per day. Default 1000. |