Generate video
generate_videoStart a video from text (text-to-video model), from a first frame and optional last frame (image-to-video model: images), or from reference images, videos and audio (reference-to-video model: references, or images for models whose inputs.images is set). The model id decides the mode — take it and its options from list_models. Spends credits: tell the user the price from list_models first. Returns a taskId right away; the video takes from about a minute to several minutes. Failed generations are refunded automatically. Media must be public https URLs; use upload_media for the user's own files.
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": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | A video model id from list_models. | |
| images | No | Image-to-video: [first frame] or [first frame, last frame]. Image-only reference models: the reference images. | |
| prompt | No | What happens in the video. | |
| duration | No | Seconds; one of the model's durations. Default: the model's default. | |
| references | No | Reference-to-video models with inputs.references: images, videos and audio to follow. | |
| resolution | No | One of the model's resolutions. Default: the model's default. | |
| aspect_ratio | No | One of the model's aspect ratios. Default: the model's first. | |
| generate_audio | No | Only for models whose audio is "optional". Default: on. |