estimate_cost
Estimate the cost of using a specific LLM model
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_name": "<model_name>",
"input_tokens": "<input_tokens>",
"output_tokens": "<output_tokens>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | Optional ISO-3166 alpha-2 country whose currency to use (e.g. DE -> EUR, IN -> INR). A country whose currency is unsupported yields USD with fallback_to_usd=true. | |
| currency | No | Optional ISO-4217 code to convert prices into, alongside the canonical USD figures. Beats country. Unsupported codes return success=false listing the supported set. | |
| model_name | Yes | Name of the LLM model (e.g., 'gpt-4', 'claude-3-opus') | |
| input_tokens | Yes | Number of input tokens | |
| output_tokens | Yes | Number of output tokens |