生成视频
POST /alibailian/api/v1/services/aigc/video-generation/video-synthesis
说明
概览
| Method | POST |
|---|---|
| Path | /alibailian/api/v1/services/aigc/video-generation/video-synthesis |
| Type | http |
| Status | -2 |
| Module | 2102810 |
| Folder | 68175428 |
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "model": { "description": "模型名称, (必选) 用于指定本次视频生成所用到的模型。示例值:wan2.5-i2v-preview。", "type": "string" }, "input": { "type": "object", "properties": { "prompt": { "description": "提示词, (可选) 用来描述生成图像中期望包含的元素和视觉特点。", "type": "string" }, "negative_prompt": { "description": "反向提示词, (可选) 用来描述不希望在视频画面中看到的内容。", "type": "string" }, "img_url": { "description": "首帧图像, (必选) 首帧图像的URL或 Base64 编码数据。", "type": "string" }, "audio_url": { "description": "音频文件URL, (可选,仅wan2.5-i2v-preview支持) 模型将使用该音频生成视频。", "type": "string" }, "template": { "description": "视频特效模板, (可选) 视频特效模板的名称。若未填写,表示不使用任何视频特效。", "type": "string" } }, "required": [ "prompt", "negative_prompt", "img_url", "audio_url", "template" ], "description": "输入信息, (必选) 输入的基本信息,如提示词、图像等。", "x-apifox-orders": [ "prompt", "negative_prompt", "img_url", "audio_url", "template" ] }, "parameters": { "type": "object", "properties": { "resolution": { "description": "视频分辨率, (可选) 指定生成的视频分辨率档位,不改变视频的宽高比。", "type": "string" }, "duration": { "description": "视频时长, (可选) 生成视频的时长,单位为秒。该参数的取值依赖于model参数。", "type": "integer" }, "prompt_extend": { "description": "Prompt智能改写, (可选) 是否开启prompt智能改写。默认值为true。", "type": "boolean" }, "watermark": { "description": "水印标识, (可选) 是否添加“AI生成”水印标识。默认值为false。", "type": "boolean" }, "audio": { "description": "自动添加音频, (可选,仅wan2.5-i2v-preview支持) 控制是否自动为视频添加音频,仅在audio_url为空时生效。", "type": "boolean" }, "seed": { "description": "随机数种子, (可选) 固定seed值有助于提升生成结果的可复现性。", "type": "integer" } }, "required": [ "resolution", "duration", "prompt_extend", "watermark", "audio", "seed" ], "description": "视频处理参数, (可选) 视频的高级处理参数,如设置分辨率、时长、水印等。", "x-apifox-orders": [ "resolution", "duration", "prompt_extend", "watermark", "audio", "seed" ] } }, "required": [ "model", "input", "parameters" ], "x-apifox-orders": [ "model", "input", "parameters" ] }, "required": false, "mediaType": "", "examples": [ { "value": "{\r\n \"model\": \"wan2.5-i2v-preview\",\r\n \"input\": {\r\n \"prompt\": \"改变一下光线\",\r\n \"img_url\": \"https://brainrot-yt-shorts.oss-cn-beijing.aliyuncs.com/images/cached/55a955b7e41723417281051d7bebdb45.png\"\r\n },\r\n \"parameters\": {\r\n \"resolution\": \"480P\",\r\n \"prompt_extend\": true,\r\n // \"duration\": 5,\r\n \"audio\": true\r\n }\r\n}", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 784553681, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "request_id": { "type": "string" }, "output": { "type": "object", "properties": { "task_id": { "type": "string" }, "task_status": { "type": "string" } }, "required": [ "task_id", "task_status" ] } }, "required": [ "request_id", "output" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]
响应示例
[ { "name": "成功示例", "responseId": 784553681, "data": "{\r\n \"request_id\": \"ccffb21f-c21e-4eba-861a-6c80e6db6e4d\",\r\n \"output\": {\r\n \"task_id\": \"a55bfe14-6e78-4b9d-b97d-128420399ed1\",\r\n \"task_status\": \"PENDING\"\r\n }\r\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 711889960 } ]