Estimate the cost of runs
estimate_costEstimate what a number of runs of one task will cost before starting them, from this organization's settled runs of the same task with the same model (the same saved workflow, or the same prompt) in the history: per_run and total give typical (median), high (90th percentile) and cap (max_cost_micros, the most a run can cost). basis.matched_runs says how many runs the range comes from; with none, only the cap is known, so start one or a few runs first and estimate again. Nothing is started or charged. On the hosted service a run costs a run fee once its worker starts, compute per second, model calls at the provider's price plus a percentage, and web requests and searches at flat prices; get_account (REST: GET /v1/me) reports the rates.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runs | No | How many runs (default 1). | |
| model | No | A model id from list_models. Omit for the workflow's or the default. | |
| prompt | No | An inline prompt, as create_run takes it. | |
| workflow | No | Name of a saved workflow (see list_workflows). Give a workflow or a prompt. | |
| max_cost_micros | No | The cap each run would have (default default_max_cost_micros). | |
| zero_data_retention | No | Whether the runs would be zero-data-retention runs, which keep no history to estimate from. |