estimate_llm_cost
Estimate the API cost in USD for a given model and token counts, at the price read daily from the provider's own pricing page (prices_as_of, price_status). Any model from list_llm_models.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "gpt-4o",
"input_tokens": 1000000,
"output_tokens": 1000000
},
"name": "estimate_llm_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model name, e.g. "gpt-4o", "claude-3.5-sonnet", "deepseek-v3" | |
| input_tokens | Yes | Number of input/prompt tokens | |
| output_tokens | No | Number of output/completion tokens (default: 0) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| rates | No | ||
| input_tokens | No | ||
| output_tokens | No | ||
| input_cost_usd | No | ||
| total_cost_usd | No | ||
| output_cost_usd | No |