Estimate a generation's cost
estimate_costUse to tell the user how many credits a video or image will cost before making it. Returns the exact credits for a model at a given resolution and, for video, clip length. No key needed.
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 |
|---|---|---|---|
| model | Yes | Model id from list_models. | |
| duration | No | Video only: clip length in seconds, one of the model's durations. Defaults to its shortest. | |
| resolution | No | One of the model's resolutions. Defaults to its lowest. |