estimate
Scope: none (any authenticated key). Preview BOTH the credit cost AND the processing time of a generation WITHOUT deducting credits.
PRE-FETCH (mandatory): resources/read kubeez://skills/billing-confirmation — Kubeez has NO refunds. The skill explains when a preview is mandatory vs optional and how to phrase the confirmation.
Pass the same model_id you'd pass to generate_media / generate_music.
Resolution-priced image models (gpt-image-2, gpt-image-2-5-flare, gpt-image-2-5-sunburst, gpt-image-2-6-flare, gpt-image-2-6-sunburst, nano-banana-2, nano-banana-2-1, nano-banana-pro, flux-3-klein, seedream-5-5): pass the same resolution ('1K' default, '2K', '4K'; seedream-5-5 takes '1.5K' default or '2K') and generation_type you will pass to generate_media; each tier has its own price. FLUX 3 Klein is a flat-priced IMAGE model (not the per-second FLUX 3 video family): pass generation_type='image-to-image' when images will be attached, since editing is priced on its own. P-Video: pass the same quality ('720p', '1080p', or a '-draft' tier). Kling 3.0 Omni: pass reference_video_seconds whenever a clip is attached; the clip picks the billed lane (References with a clip bills its dearer -video tier, no clip runs on Frames). A References clip alone bills the clip's length; with stills beside the clip it bills the duration you pick, so also pass generation_type='image-to-image' and that duration. Kling 4.0: pass reference_video_seconds (total of the reference clips) and the same elements you will pass to generate_media; a video element moves the quote onto the -video row and adds its seconds, measured by the server (it must be a Kubeez upload). Reference clips plus video elements over 30s combined are refused. Kling 4.0 Flash (kling-4-0-flash-720p) quotes the same way with a 20s combined cap; a Flash run with first_frame_url bills the no-clip row, so quote it without reference_video_seconds. Gemini Omni 1.2 Flash (gemini-omni-1-2-flash-*): pass duration for a text, image or frames run; for a video edit pass reference_video_seconds (the clip's length is the bill) or video_edit=true, which without a length quotes the 15s maximum. GPT Image 2.6 (gpt-image-2-6-economy / -flare / -sunburst): pass reference_image_count, the number of image URLs you will send in source_media_urls (duplicates count). Any count above 0 quotes the edit, which on Flare and Sunburst adds a charge per reference image; the explanation shows base + per image x count. An edit quoted without a count assumes the 16-image maximum (pessimistic). Seedream 5.5 (seedream-5-5, resolution '1.5K' or '2K'): pass reference_image_count the same way; every reference image adds its charge, the first one included, and an edit quoted without a count assumes the 10-image maximum (pessimistic). Seedream 5.0 Pro (seedream-5-pro, -edit, -2K, -edit-2K): pass reference_image_count too; the first reference image is free and every one after it adds a charge, and an edit quoted without a count assumes the 10-image maximum (pessimistic). For an animated GIF pass output_format='gif' and the same frame_count / frame_duration_ms you will pass to generate_media: GIF is text-to-image only and has its own price by frame count, not by resolution.
Per-duration video models — pass duration (seconds). Audio defaults to ON across all video models (matches generate_media's default). For Kling 3.0 this means the per-second audio surcharge (rate in get_models — don't assume) is reflected by default; pass sound=false to preview the silent rate. For Seedance 2 audio is free (same rate either way). Seedance 2 with video reference — pass reference_video_seconds (from get_upload_session.media[].duration_seconds; omitted, the quote assumes the 15s cap). P-Video with audio input — pass reference_audio_seconds. These seconds only shape the QUOTE: generate_media always bills the server's measurement of the attached file.
Returns: • credits: { estimated_credits, mode, rate_per_second?, explanation, pessimistic } • time: { estimated_seconds, source } • price_for: seconds → the COMPLETE credit cost at that length, for THIS model, when it supports more than one. Offer the user the other lengths instead of silently keeping yours — duration is the biggest lever on a per-second bill. In agent-chat, pass these straight to show_plan_card as duration_options and the card renders tappable length chips. When credits.pessimistic is true the quote assumed a ceiling and the real bill may be lower: pass the file's measured seconds (get_upload_session.media[].duration_seconds) and re-estimate.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| sound | No | ||
| prompt | No | ||
| quality | No | ||
| duration | No | 5 | |
| elements | No | ||
| resolution | No | ||
| video_edit | No | ||
| frame_count | No | ||
| output_format | No | ||
| variant_count | No | ||
| generation_type | No | text-to-image | |
| negative_prompt | No | ||
| frame_duration_ms | No | ||
| reference_image_count | No | ||
| reference_audio_seconds | No | ||
| reference_video_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||