estimate_cost
Monthly cost of a described workload, or of measured usage, on each model. Accounts for history compounding, cache writes, long-context tiers and reasoning tokens. Use this instead of multiplying prices by hand.
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": {
"models": "<models>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turns | No | Turns per conversation. Default 4. | |
| usage | No | Measured totals to price instead: input, output, cache_read, cache_write tokens (input excludes cache reads). | |
| models | Yes | Up to about 8. | |
| user_tokens | No | Typical user message. Default 150. | |
| output_tokens | No | Typical reply. Default 350. | |
| system_tokens | No | System prompt size. Default 800. | |
| use_batch_api | No | Apply batch discounts. | |
| cached_input_share | No | 0-1. Default 0. | |
| reasoning_multiplier | No | Bill output at this multiple. Default 1. | |
| conversations_per_day | No | Default 1000. |