Generate video
generate_videoCreate a short video clip from a written description. Video is the expensive path: a clip typically costs 50-150 credits against the workspace's Masonry balance (list_models has exact per-model prices) and takes about 1-5 minutes. Waits for the clip and returns it in the conversation; if it is still rendering when the wait ends, the reply carries a job_id: the job keeps running and check_generation returns its result. Starting the same job again makes and bills a second one. For requests longer than 10 seconds (including 1 min), or any multi-scene script, generate scenes as separate clips, keep characters consistent with the same reference images, then call combine_clips with their job_ids to deliver one video. For spoken dialogue or voiceover, call generation_guidance first: only some models can speak. Call list_skills and pass skill_slug when the request matches a Masonry video skill; write prompt from the user's request.
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>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model key (see list_models). Defaults to the workspace's default video model, or the first recommended one that takes the references given. | |
| prompt | Yes | Text prompt describing the video to generate. | |
| silent | No | Set true for a clip with no sound of its own, e.g. when a voiceover or music goes on in combine_clips. Models without an audio switch ignore it; combine_clips can mute any clip. | |
| voices | No | Optional voices for the people who speak, up to 3, for models with voice_ids (Kling 4.0): each a Kling voice id or an add_media media_id of a recording of one person speaking 5-30 seconds. A recording is meant to be the user's own voice, or that of someone who has agreed to it. Name them @Voice1, @Voice2 in the prompt, in order. | |
| options | No | Optional model-specific settings by name, for example resolution set to 1080p. Only settings the chosen model has; a wrong name is refused with the list it accepts. | |
| elements | No | Optional people, characters or products to keep identical through the clip, for models list_models shows with elements (Kling 4.0): each a front photo plus 1-3 other angles. Name them @Element1, @Element2 in the prompt, in order. Omit model and Masonry picks one that takes them. | |
| characters | No | Workspace characters by name (see list_characters). Each one's sheet is sent as a reference image, after reference_image_urls, so the same person or mascot appears. For the closest likeness, make a still with generate_image (characters) and animate_image it instead. Meant for a character the user named. With skill_slug, a name from that template's cast (read_skill lists it) is added to the workspace on first use, free. | |
| skill_slug | No | Optional Masonry skill slug from list_skills. Uses the selected skill for provenance and model routing only; skill text is guidance, and the prompt describes the user's request. | |
| aspect_ratio | No | Optional aspect ratio. Any ratio the chosen model supports (list_models shows each model's ratios), e.g. 4:5, 16:9, 9:16, or an exact WIDTHxHEIGHT on models that accept custom sizes. An unsupported ratio is refused with the model's supported list; nothing is silently substituted. Omit for the model's default. | |
| duration_seconds | No | Optional clip duration in seconds (model-specific). | |
| reference_image_urls | No | Optional photos of a real person or product to keep identical in the clip: direct https image URLs or masonry:// references (masonry://generations/<job_id> for an image made earlier). Only models that take reference images use them (list_models marks them refs, with their limit); any other model refuses the call. Refer to them in the prompt as @Image1, @Image2 in order. |