视频编辑(Modify) 生成视频
POST /openapi/v2/video/modify/generate
概览
| Method | POST |
|---|---|
| Path | /openapi/v2/video/modify/generate |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 86260306 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "id": "8rjkpHLAmE", "name": "Content-Type", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "application/json" }, { "id": "30KdoxQihe", "name": "API-KEY", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "{{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "video_media_id": { "type": "integer", "description": "通过接口上传的视频 media_id,必传source_video_id 或 video_media_id" }, "prompt": { "type": "string", "description": "如果 Prompt 中使用了 mask,请使用 @selection0、@selection1;如果使用参考图片,请使用 @img0、@img1\n, 支持 5000字符" }, "img_ids": { "type": "array", "items": { "type": "integer" }, "description": "通过上传接口获取的img_id, 最多支持3个" }, "mask_ids": { "type": "array", "items": { "type": "string" }, "description": "通过swap-mask接口获取的mask_id, 最多支持3个" }, "keyframe_ids": { "type": "integer", "description": "指定使用视频中的哪一帧进行替换(编辑)" }, "quality": { "type": "string", "description": "\"360p\",\"540p\",\"720p\"" }, "source_video_id": { "type": "string", "description": "通过拍我AI 生成的视频video_id,必传source_video_id 或 video_media_id\n" } }, "required": [ "prompt", "quality", "source_video_id" ], "x-apifox-orders": [ "video_media_id", "source_video_id", "prompt", "img_ids", "mask_ids", "keyframe_ids", "quality" ] }, "required": true, "mediaType": "", "examples": [ { "name": "示例 1", "value": "{\r\n \"video_media_id\": 1234,\r\n \"prompt\": \"@selection0 subject is swapped with @img0\",\r\n \"img_ids\": [\r\n 123\r\n ],\r\n \"mask_ids\": [\r\n \"3847593904\"\r\n ],\r\n \"keyframe_ids\": 1,\r\n \"quality\": \"540p\"\r\n}", "mediaType": "application/json" } ], "oasExtensions": "" }
响应
[ { "id": 128565803, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]