Estimate generation cost
estimate_generationEstimate the credits one generation would cost and compare it with the current balance. It validates the parameters exactly like the generation tool but does not generate media or deduct credits. Media inputs of models priced by input length are downloaded and measured first.
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_generation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model ID. Omit to use the default model of the operation. | |
| params | No | The arguments the generation tool would receive (top-level fields and extras). | |
| operation | No | Which generation the estimate is for: image, video, speech, audio (music, or a sfx/ model), upscale, video_upscale, transcribe, media_import or html_video (params.method render, or generate / edit for generate_html_video). Optional when model is given. For social URLs, media_import estimates upload_asset with params url, type audio/video, quality and max_duration, and transcribe estimates social caption retrieval including its automatic audio fallback; both read the source length from metadata without downloading and return the full prepaid reservation. frame_interpolation estimates increase_frame_rate (params video_url plus extras target_fps, slowdown_factor) and lip_sync estimates lip_sync_video (params video_url, plus audio_url and model when given). swap_video_characters quotes its price with its free previews, so call it directly. | |
| skills_used | No | Optional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs. |