happyhorse-1.0-video-edit
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 | 1 |
| Module | 2102810 |
| Folder | 68175428 |
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "model": { "type": "string", "description": "模型名称。\n\n固定值:happyhorse-1.0-video-edit。" }, "input": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词。用来描述对视频的编辑意图,如风格转换、局部替换等。\n\n支持任何语言输入,长度不超过5000个非中文字符或2500个中文字符,超过部分会自动截断。" }, "media": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "媒体素材类型。可选值为:\n\nvideo:必传。待编辑的视频。\n\nreference_image:可选。参考图像。\n\n素材限制:\n\n视频数量:有且仅有1个。\n\n参考图像数量:0~5张。" }, "url": { "type": "string", "description": "传入视频(type=video)\n\n待编辑的视频URL,必须为公网可访问的URL。\n\n支持 HTTP 和 HTTPS 协议。\n\n示例值:https://xxx/xxx.mp4。\n\n视频限制:\n\n格式:MP4、MOV(建议H.264编码)。\n\n时长:3~60秒。\n\n分辨率:长边不超过2160像素,短边不小于320像素。\n\n宽高比:1:2.5~2.5:1。\n\n文件大小:不超过100MB。\n\n帧率:大于8fps。\n\n说明\n输出视频时长:3~15秒。\n\n当输入视频不超过 15 秒时,输出视频时长与输入视频保持一致。\n\n当输入视频超过 15 秒时,系统会从头开始自动截取前 15 秒作为有效片段,因此最长输出为 15 秒。\n\n传入图像(type=reference_image)\n\n参考图像的URL,必须为公网可访问的URL。\n\n支持 HTTP 或 HTTPS 协议。\n\n示例值:https://xxx/xxx.png。\n\n图像限制:\n\n格式:JPEG、JPG、PNG、WEBP。\n\n分辨率:宽高尺寸不小于300像素。\n\n宽高比:1:2.5~2.5:1。\n\n文件大小:不超过10MB。" } }, "required": [ "type", "url" ], "x-apifox-orders": [ "type", "url" ] }, "description": "媒体素材列表,用于指定待编辑的视频和参考图像。\n\n数组必须包含1个 video 类型元素;可选包含0~5个 reference_image 类型元素。" } }, "required": [ "prompt", "media" ], "x-apifox-orders": [ "prompt", "media" ], "description": "输入" }, "parameters": { "type": "object", "properties": { "resolution": { "type": "string", "description": "生成视频的分辨率档位。\n\n可选值:\n\n1080P:默认值。\n\n720P" }, "watermark": { "type": "boolean", "description": "是否在生成的视频上添加水印标识。水印位于视频右下角,文案固定为“Happy Horse”。\n\ntrue:默认值,添加水印。\n\nfalse:不添加水印。" }, "audio_setting ": { "type": "string", "description": "声音控制。\n\nauto:默认值,由模型自行控制。\n\norigin:保留输入视频的原始声音。" } }, "x-apifox-orders": [ "resolution", "watermark", "audio_setting " ], "description": "参数" } }, "required": [ "model", "input" ], "x-apifox-orders": [ "model", "input", "parameters" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"model\": \"happyhorse-1.0-video-edit\",\r\n \"input\": {\r\n \"prompt\": \"让视频中的马头人身角色穿上图片中的条纹毛衣\",\r\n \"media\": [\r\n {\r\n \"type\": \"video\",\r\n \"url\": \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4\"\r\n },\r\n {\r\n \"type\": \"reference_image\",\r\n \"url\": \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260415/hynnff/wan-video-edit-clothes.webp\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"resolution\": \"720P\"\r\n }\r\n}" } ], "oasExtensions": "" }
响应
[ { "id": 154118239, "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" ], "x-apifox-orders": [ "task_id", "task_status" ] } }, "required": [ "request_id", "output" ], "x-apifox-orders": [ "request_id", "output" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]
响应示例
[ { "name": "成功示例", "responseId": 154118239, "data": "{\n \"request_id\": \"1445f928-f1b6-9c43-8143-bfaddb5989cf\",\n \"output\": {\n \"task_id\": \"86438901-c911-4bfa-9137-621478c85efd\",\n \"task_status\": \"PENDING\"\n }\n}", "id": "019e1165-e2b4-7502-8bcb-3306cfdcb17d" } ]