generate_media
Scope: generate:media. Generate images or videos using 40+ AI models, OR extend a completed Veo 3.1 video.
============================================================
STOP. BEFORE you call this tool, you MUST fetch the skills
below that match the request. This is not optional.
Three equivalent fetch paths — use the FIRST one your client supports:
① TOOL CALL: get_skill(name="<skill>") — bulletproof, works in
every MCP client (Claude.ai web included). No fetch tool needed.
② MCP resources/read on kubeez://skills/<name> (canonical)
③ HTTPS GET on https://mcp.kubeez.com/skills/<name>.md
(caveat: hosted-agent web_fetch may block model-constructed
URLs — fall back to ① if it refuses)
Reading is free; firing this tool blind wastes user credits.
ALWAYS: • kubeez://skills/model-selection — picking the right model. IF the user wants a post / blog / newsletter / social / ad / thumbnail: • kubeez://skills/content-creation — MANDATORY. Quality bar + propose-before-generate rule + creative-director prompting. IF the user wants a MARKETING CAMPAIGN asset (paid social ad, landing hero, brand campaign, product launch, OOH): • kubeez://skills/marketing-campaign — MANDATORY ALONGSIDE content-creation. Niche → visual genre cheat sheet so the asset matches the industry instead of looking like generic AI marketing slop. IF the user wants a CAROUSEL / multi-slide post / LinkedIn carousel / IG carousel / 'slides about X': • kubeez://skills/viral-carousel — MANDATORY ALONGSIDE content-creation. Design modes (named style or a bespoke system for the topic) + slide archetypes + prompt bar + slide-1-anchor cohesion workflow. Without it, multi-slide outputs drift into 10 unrelated AI images. IF the user wants PRODUCT photography (packshot, marketplace white, lifestyle, in-hand, flatlay, website hero banner, ad pack, try-on): • kubeez://skills/product-photoshoot — MANDATORY. Product identity lock, mode recipes, banner copy area and headroom. IF the user wants a THUMBNAIL or a video / reel / podcast COVER: • kubeez://skills/thumbnail-generation — MANDATORY. Concept frameworks, text size and safe zones. IF the user wants a CHARACTER SHEET / turnaround / a consistent character to reuse: • kubeez://skills/character-sheet — MANDATORY. Style-aware sheet template and the reuse routes. IF the user wants their LOGO on merch / packaging / signage / a brand board, or a new logo: • kubeez://skills/brand-mockups — MANDATORY. The real logo file is attached and reproduced exactly, never redrawn. IF the user has a local file or attachment (no public HTTPS URL yet): • kubeez://skills/media-upload — the 3-step upload flow. IF the model is per-duration (any video, captions, separation, ref-video, audio-driven): • kubeez://skills/billing-confirmation — preview cost before generating. Kubeez has NO refunds. IF generation_type='extend': • kubeez://skills/video-extend — Veo 3.1 extend workflow. IF the user says 'Seedance' without specifying which generation/tier (2.5 vs 2 vs fast vs mini): • kubeez://skills/seedance-2-tiers — disambiguation rules. IF model='seedance-2-5*' AND the prompt is non-trivial (2+ reference assets, a script, keyframes, a storyboard, a blockout, >15s, or dialogue): • kubeez://skills/seedance-2-5-prompting — material roles, @Image N ordering, keyframe routes, 10000-char cap. If unsure whether a skill applies → fetch it. Reading is free.
GENERATION TYPES: • text-to-image / image-to-image / text-to-video / image-to-video — the standard set. Use get_models to confirm which a given model supports. • extend — Veo 3.1 ONLY. Pass source_task_id (NOT generation_id), prompt, and extend_model. Flat-priced per tier (lite < fast < quality) — read the exact price from get_models / estimate. Skip aspect_ratio/duration/source_media_urls in this mode. See kubeez://skills/video-extend.
SEEDANCE 2.5 DRAFT MODE: quality='draft' on seedance-2-5-480p (480p only) renders a cheap preview billed like a normal 480p render. To promote a COMPLETED draft to its 1080p final, call again with draft_generation_id=<the draft's generation_id> (prompt/model are ignored; the final reuses the draft's prompt, references, duration and ratio). Finals bill on the seedance-2-5-1080p row, read the rate from get_models / estimate. Drafts can be finalized for 7 days. Seedance 2.5 Flash (seedance-2-5-flash-*) has NO Draft mode: quality='draft' and draft_generation_id are refused on it.
IMAGE-TO-VIDEO vs TEXT-TO-VIDEO (READ THIS — agents pick wrong here a lot):
• image-to-video means a strict frame TRANSITION between exactly TWO images: image #1 = literal first frame of the output, image #2 = literal last frame, the model interpolates the in-between. Use it ONLY when the user explicitly wants a transition / morph / start-to-end shot.
• Animating a SINGLE image, or a video that just FEATURES one or more reference images (subject, brand, product), is text-to-video — pass the image(s) in source_media_urls and the model uses them as references. Seedance 2 text-to-video accepts up to 9 reference images; Kling 3.0 / Veo similar (see get_models).
• Seedance 2 specifically: image-to-video requires EXACTLY 2 images. 1 or 3+ images with image-to-video are auto-routed to text-to-video as references. If the user gave you N images and didn't say 'transition' / 'morph from A to B' / 'start frame to end frame' — use text-to-video.
• Seedance 2.5 DIFFERS from the 2.0 rule above: image-to-video takes 1 image (literal first frame) or 2 (first + last) — it is NOT auto-routed. 3+ images with image-to-video is a hard too_many_images rejection, not a silent downroute. In that mode aspect_ratio is forced to adaptive (output inherits the first frame's ratio) and NO other reference images/videos are accepted alongside the frames (reference audio still is). Text-to-video on 2.5 accepts up to 30 reference images / 10 videos / 10 audio. Seedance 2.5 Flash (seedance-2-5-flash-480p / -720p, 480p and 720p only) follows the same 2.5 rules with up to 10 reference images / 5 videos / 5 audio. To lock a first frame AND keep extra references, use text-to-video and declare the frame in the prompt — see kubeez://skills/seedance-2-5-prompting.
MODEL IDS: use only ids that came from get_models or plan — never invent or guess one. You do NOT need to call get_models every time: if you already know the id and its limits, go straight to generating. Call it when you are unsure which model fits, when you need a concrete variant, or when a capability matters (prompt_max_chars, duration_options, max_input_images, supports_negative_prompt, supports_sound, video_audio) — each row carries those plus usage_notes, and they must be respected.
VARIANT DISAMBIGUATION: Some families (seedance-2, seedance-2-fast, seedance-2-mini, seedance-2-5, seedance-2-5-flash, p-video, flux-3, gemini-omni-video, gemini-omni-flash, gemini-omni-1-2-flash, kling-3-0-omni, kling-4-0, kling-4-0-flash, kling-3-0-turbo, kling-3-0-motion-control, kling-2-6-motion-control, wan-2-7, wan-3-0, grok-imagine-video-1-5-preview) expose multiple concrete model_ids (resolution tiers, draft vs standard, with/without video-ref). PREFER passing a concrete model_id up front: when the user gave no resolution preference, default straight to the recommended variant (e.g. seedance-2-720p) instead of the bare family, so there is NO round-trip. If you DO call with a bare family label, the server returns variant_required with a recommended_variant: ADOPT it and continue straight to estimate / show_plan_card, where the cost (and thus the resolution/price trade-off) is confirmed, so a separate variant question is usually unnecessary. Ask the user only when they signalled they care about price/quality, or when the applicable variants differ in CAPABILITY (not just resolution). EXCEPTION: when a reference VIDEO is attached, pass the BARE family (do NOT hand-pick a concrete id) and the server selects the correct -video-ref variant and its billing for you.
ASPECT RATIO: ALWAYS use the aspect_ratio parameter — do NOT bury 9:16 / 16:9 / 1:1 in the prompt. 'banner'/'landscape' → 16:9, 'vertical'/'story' → 9:16, 'square' → 1:1. The prompt should describe content, not dimensions.
GPT-IMAGE-2 — 2K and 4K REQUIRE a non-square, non-auto aspect_ratio (9:16 / 16:9 / 4:3 / 3:4). Calling 2K/4K with auto or 1:1 returns 400 and credits are NOT held.
GPT-IMAGE-2-6: three model_ids: gpt-image-2-6-economy (1K only, 8 aspect ratios, no 3:4 / 4:5), gpt-image-2-6-flare and gpt-image-2-6-sunburst (1K / 2K / 4K, 16 aspect ratios). Up to 16 reference images. An edit (any source_media_urls) costs the edit row price plus a charge per reference image on Flare and Sunburst (duplicates count), so estimate it with reference_image_count. Optional background='transparent'|'opaque'|'auto' at 1K only. Optional output_format: 'png' (default), 'jpeg' / 'webp' (Flare and Sunburst), or 'gif' for an animated GIF. GIF is text-to-image only (refused with source_media_urls) and has its own price: Flare and Sunburst need frame_count, a whole number 2 to 16; Economy takes frame_count 'auto', 4, 9, 16, 25, 36 or 64 (optional). Optional frame_duration_ms 20 to 2000 per frame. Read GIF prices with estimate(output_format='gif', frame_count=N). An unsupported resolution, aspect_ratio, output_format or frame_count is refused before credits move.
SEEDREAM-5-5: two rows, seedream-5-5 (1.5K) and seedream-5-5-2K, or pass resolution='1.5K' (default) / '2K' on seedream-5-5. Text-to-image with no source_media_urls, or edit with 1 to 10 reference images on the same id (no -edit ids). An edit costs the row price plus a charge per reference image, the first one included (duplicates count), so estimate it with reference_image_count. aspect_ratio 1:1, 4:3, 3:4, 16:9 or 9:16 (no auto). Anything else is refused before credits move.
AUDIO ON VIDEO: the sound parameter defaults to TRUE, so audio is ON for EVERY model that supports it unless the user explicitly asks for a silent clip (only then pass sound=false). Read capabilities.video_audio: 'included' means audio is always bundled and the sound param is ignored; 'toggle_via_sound_param' means the sound flag controls audio and DEFAULTS ON (free on Seedance 2; on Kling 2.6, Kling 3.0 and Kling 3.0 Omni Frames / References (their -audio rows cost more per second at 720p and 1080p) audio costs extra, so keep it on by default but state the higher audio price in your cost quote so the user is not surprised); 'silent' means no generated audio (Seedance 1.0 only). Never silence a model's audio on your own initiative. Do NOT infer audio from supports_sound alone.
CONSISTENT CHARACTER + VOICE (Google Gemini Omni Video): this is the ONE family that can lock a REUSABLE on-camera identity. Every other talking-video model (Veo 3.1, Kling 3.0 Pro, P-Video) re-rolls a fresh face and voice on each generation, so a multi-clip campaign drifts. Gemini Omni Video does NOT: save a character once, then every clip renders the SAME person with the SAME voice. WHEN TO REACH FOR IT (and proactively suggest it): the user wants a recurring spokesperson / mascot / brand presenter, a video SERIES or ad set, or anything where 'keep the same person/voice across clips' matters. WORKFLOW: (1) manage_library(kind='character', action='create', descriptions=..., image_url=..., character_name=..., voice_id=...) saves the identity once (bind a voice_id from list_gemini_omni_voices so the voice is locked too); (2) for each clip call generate_media with a gemini-omni-video-* / gemini-omni-flash-* model, passing character_ids=[<character_id from list_gemini_omni_characters>] and/or voice_id=.... character_ids and voice_id are accepted ONLY by gemini-omni-video-* / gemini-omni-flash-* models (ignored elsewhere; Gemini Omni 1.2 Flash, gemini-omni-1-2-flash-*, has no characters or voices and refuses them). Each character_id consumes 1 of 7 reference slots. This is VIDEO identity; it does NOT change the image-model rule (character consistency in still images stays on gpt-image-2-5-sunburst).
KLING 4.0 ELEMENTS + VOICES (kling-4-0-* ONLY, refused on every other model): elements = up to 7 one-time subjects [{name, image_urls (2-4) OR video_url (one 3-8s MP4/MOV character clip uploaded to Kubeez), tag?, description?, voice_url?}], voices = up to 3 [{name, audio_url}]. Voice samples are 5-30s; reference clips (3-30s each) plus video elements are 30s combined. Mention each in the prompt as @name; unmentioned ones are not sent, an unmatched @ is refused. A video element bills like a reference clip (the -video row plus its seconds), so pass the same elements to estimate. Full rules: get_models usage_notes for kling-4-0. list_assets returns saved Kling 4.0 elements and voices already in this shape; save new ones for reuse (they also appear in the user's studio) with manage_library(kind='kling_element' | 'kling_voice', action='create'). KLING 4.0 FLASH (kling-4-0-flash-720p): a separate Kling 4.0 tier, 720p only, 3-20s. Same references and elements (reference clips 2-20s each, clips plus video elements 20s combined) but NO voices (bind a voice_url on a character element instead). Saved Kling 4.0 elements work on Flash too; saved voices do not. KLING 4.0 FRAMES (start + end frame): first_frame_url (@first_frame) starts the video; on kling-4-0-720p / -1080p add up to 8 keyframe_urls in order (@keyframe_1 ...) and a closing last_frame_url (@last_frame), frames in total at most min(10, seconds + 1) counting first and last. Flash takes the first frame only. Frames exclude references and elements, follow the first frame's shape (no aspect_ratio) and bill the clip-free row.
KLING 3.0 STORYBOARD + ELEMENTS (kling-3-0-std / -pro / -4k ONLY): shots = 1-5 [{prompt (<= 500 chars, 2500 in total), duration (whole seconds 1-12)}], 3-15s in total; the video is as long as the shots added up and bills those seconds, needs sound on, and prompt is required but not sent (pass a one-line summary). elements on Kling 3.0 = up to 3 [{name (letters, digits, _), description, image_urls (2-4 images)}], mentioned as @name in the prompt or a shot; every @word must be a passed element, and a mention needs a start frame in source_media_urls. Image elements add no cost.
STUDIO SWITCHES (each refused on any other model, unset = the model's default): video_edit=true (Seedance 2.5 and Seedance 2.5 Flash: edit the one attached reference clip; the output keeps its length and frame, no duration; billed on the -video-ref row with the clip's measured length as the output seconds, estimate with video_edit=true and reference_video_seconds; also accepted on gemini-omni-1-2-flash-*, where a clip alone already makes an edit), fps 24 | 48 (P-Video, default 48), enable_translation (Veo 3.1, default on), prompt_extend (Wan 2.7, default on), turbo (p-image-edit, default on), output_format png | jpeg (nano-banana, nano-banana-edit, nano-banana-2, nano-banana-2-1, nano-banana-pro, qwen-text-to-image, qwen-image-to-image; default png).
GEMINI OMNI 1.2 FLASH (gemini-omni-1-2-flash-360p / -720p / -1080p / -4k, the id sets the resolution): per-second, built-in audio, a separate model from 1.1 Flash. The mode follows what you attach: prompt only or up to 6 images in source_media_urls (duration 3-15); first_frame_url alone (3-15); first_frame_url + last_frame_url (3-10; frames exclude images and video); or ONE clip in source_media_urls / reference_video_urls (at most 15s, a Kubeez upload, up to 5 images beside it) = a video edit with NO duration, billed on the clip's measured length. No trim window (trim_video first), no character_ids, voice_id or audio (use 1.1 Flash for those). aspect_ratio auto (default), 16:9 or 9:16; seed 10000-99999. Full rules: get_models usage_notes.
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": {
"prompt": "<prompt>",
"model": "<model>"
},
"name": "generate_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | ||
| mode | No | ||
| seed | No | ||
| model | Yes | ||
| shots | No | ||
| sound | No | ||
| turbo | No | ||
| prompt | Yes | ||
| voices | No | ||
| quality | No | standard | |
| duration | No | ||
| elements | No | ||
| voice_id | No | ||
| background | No | ||
| fixed_lens | No | ||
| resolution | No | ||
| video_edit | No | ||
| frame_count | No | ||
| aspect_ratio | No | 1:1 | |
| extend_model | No | fast | |
| character_ids | No | ||
| keyframe_urls | No | ||
| output_format | No | ||
| prompt_extend | No | ||
| last_frame_url | No | ||
| source_task_id | No | ||
| first_frame_url | No | ||
| generation_type | No | text-to-image | |
| negative_prompt | No | ||
| video_trim_end_s | No | ||
| frame_duration_ms | No | ||
| source_media_urls | No | ||
| enable_translation | No | ||
| video_trim_start_s | No | ||
| draft_generation_id | No | ||
| keep_original_sound | No | ||
| reference_file_urls | No | ||
| reference_link_urls | No | ||
| reference_audio_urls | No | ||
| reference_image_urls | No | ||
| reference_video_urls | No | ||
| character_orientation | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||