estimate_cost
Estimate the USD cost of an LLM API call for a given model and token counts. Returns input/output/total cost, plus reseller markup vs. the upstream model when applicable.
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>",
"input_tokens": "<input_tokens>",
"output_tokens": "<output_tokens>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model id in provider/model form, e.g. anthropic/claude-opus-4-8. Use list_models to discover ids. | |
| input_tokens | Yes | Number of input (prompt) tokens. | |
| output_tokens | Yes | Number of output (completion) tokens. |