estimate_cost
Estimate a run's typical and maximum USD cost and prompt token usage before execution, without making API calls or spending money; unpriced models return null costs.
Instructions
Estimate the cost of a run with no API call and no spend.
Returns typical and maximum cost in USD, the prompt token estimate, and the per-token pricing used. An unpriced model returns priced false and null costs.
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>",
"text_length_chars": "<text_length_chars>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| max_tokens | No | ||
| n_findings | No | ||
| text_length_chars | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |