ai.estimate_cost
Price an AI task BEFORE running it: provider passthrough at wholesale cost, no markup — the per-token platform fee is retired, so text/reasoning passes through at cost. Anonymous — open catalog includes open pricing. Returns integer micro-USD plus a USD total. NEXT: run the action, then ai.budget to watch the runway.
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": {
"task": "<task>"
},
"name": "ai.estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | A token-billed task name from the platform task→model map (e.g. 'assistant.ask'). | |
| tokens_in | No | Estimated input tokens (default 1000). | |
| tokens_out | No | Estimated output tokens (default 500). |