estimate_cost
Estimate the cost of an AI API call given model and token counts or text. Returns input/output/total cost and optional monthly projection.
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": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to tokenize for input (if input_tokens not given). | |
| model | Yes | Model ID, e.g. gpt-4o, claude-opus-4, gemini-2.0-flash. | |
| input_tokens | No | Number of input tokens. | |
| output_tokens | No | Number of output tokens. | |
| requests_per_day | No | If given, adds daily/monthly/yearly cost projection. |