generate_video
Generate videos from text prompts or starting images, with options for duration, resolution, and aspect ratio. Supports async processing, returning a task ID for later status checks.
Instructions
视频生成:文生视频或图生视频(DashScope 万相异步任务)。
生成耗时较长(通常 1-10 分钟)。默认阻塞等待完成;若超时或被中断, 可用返回的 task_id 通过 get_video_status 继续查询。
Args: prompt: 视频内容描述(支持分镜头描述,如 "第1个镜头... 第2个镜头...")。 model: 模型名。默认 wan2.6-t2v;图生视频用 wan2.5-i2v-preview / wan2.6-i2v 等。 image: 图生视频的首帧图片(本地路径 / URL / data: URL;文生视频留空)。 duration: 视频时长(秒),2-15 之间。 size: 分辨率 "宽x高"(如 "1280x720",wan2.5/2.6 系列)。 resolution: 分辨率档位 480P/720P/1080P(wan2.7 系列)。 ratio: 画幅比例(如 "16:9"、"9:16"、"1:1",wan2.7 系列)。 seed: 随机种子。 negative_prompt: 反向提示词。 prompt_extend: 是否开启提示词智能改写。 watermark: 是否添加水印(默认随模型)。 shot_type: 镜头类型(如 "multi" 多镜头,wan2.6 支持)。 wait: 是否阻塞等待任务完成(默认 true;false 立即返回 task_id)。 output_dir: 本地保存目录(相对路径相对于全局输出目录)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| size | No | ||
| wait | No | ||
| image | No | ||
| model | No | ||
| ratio | No | ||
| prompt | Yes | ||
| duration | No | ||
| shot_type | No | ||
| watermark | No | ||
| output_dir | No | ||
| resolution | No | ||
| prompt_extend | No | ||
| negative_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||