dry_run_cost_estimate
Estimate chat completion cost before sending a request by using cached model pricing; returns projected input/output token counts and cost.
Instructions
Estimate the cost of a chat completion without sending it to the API. Uses cached pricing from the model spec card. Returns estimated input/output token counts and cost.
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_or_alias": "<model_or_alias>",
"messages": "<messages>"
},
"name": "dry_run_cost_estimate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Messages to estimate cost for | |
| model_or_alias | Yes | Model ID or alias | |
| max_output_tokens | No | Assumed output tokens (default 500) |