Generate AI media (image or animation)
generate_mediaGenerate an AI image or canvas-code-based animation directly into a clip.
kind="image": text-to-image. Pass
prompt. Optional:style_id(from find type='image_gen_style_packs'),reference_image_urlormcp_upload_idfor image-to-image grounding.kind="animation": canvas-code animation rendered from a prompt. Pass
prompt. Optional:voiceover_text(drives timing),base_component_id(reuse a saved animation as the starting point),reference_image_urlormcp_upload_idfor visual grounding.
Generation is asynchronous: the element is created immediately with a stable element_id and rendered in the background. Poll get_clip (the phantom flag drops once rendering completes).
Tip: use this tool whenever the user asks for a "generated", "AI", or "create me a" visual. For uploaded photos / logos / icons / GIFs, use add_elements with element_type='image' and a src or mcp_upload_id instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Top-left X in canvas pixels. | |
| y | Yes | Top-left Y in canvas pixels. | |
| kind | Yes | 'image' = AI text-to-image; 'animation' = canvas-code-based motion graphic. | |
| width | Yes | Width in pixels. | |
| height | Yes | Height in pixels. | |
| prompt | Yes | Generation prompt. For animations, be SPECIFIC: name the UI elements, interaction sequence, timing feel, and visual style. Vague prompts produce bad output. | |
| clip_id | Yes | Clip ID to place the generated element into. | |
| end_time | No | Disappear at (seconds). | |
| style_id | No | Image only. Style preset ID from find(type='image_gen_style_packs'). See resource clueso://docs/generation-styles. | |
| project_id | Yes | Project ID. | |
| start_time | No | Appear at (seconds). | |
| mcp_upload_id | No | mcp_upload_id from the upload flow. Resolved server-side to a presigned URL before generation. | |
| voiceover_text | No | Animation only. Paces the motion to the spoken script — and as a side effect sets this clip's voiceover text and triggers speech generation for the clip. | |
| base_component_id | No | Animation only. Reuse a saved animation component as the starting point (from find(type='element_components')). To re-skin its tunable parameters, set parameter_values via update_elements after it renders. | |
| reference_image_url | No | Public URL of a reference image. Mutually exclusive with mcp_upload_id. |