对口型
POST /kling/v1/videos/advanced-lip-sync
概览
| Method | POST |
|---|---|
| Path | /kling/v1/videos/advanced-lip-sync |
| Type | http |
| Status | -1 |
| Module | 2102810 |
| Folder | 72928823 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "required": false, "description": "", "type": "string", "id": "6VqSIt7n3n", "enable": true, "name": "Content-Type", "sampleValue": "application/json" }, { "required": false, "description": "", "type": "string", "id": "duM1EaJS07", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "session_id": { "type": "string", "description": "会话ID,会基于对口型人脸识别接口生成" }, "face_choose": { "type": "array", "items": { "type": "object", "properties": { "face_id": { "type": "string", "description": "人脸ID由人脸识别接口返回" }, "audio_id": { "type": "string", "description": "通过试听接口生成的音频的ID仅支持使用30天内生成的、时长不短于2秒且不超过60秒的音频/audio_id、sound_file参数二选一,不能同时为空,也不能同时有值" }, "sound_file": { "type": "string", "description": "音频文件 支持传入音频Base64编码或图音频URL(确保可访问) 音频文件支持.mp3/.wav/.m4a,文件大小不超过5MB,格式不匹配或文件过大会返回错误码等信息 仅支持使用时长不短于2秒且不长于60秒的音频 audio_id、sound_file参数二选一,不能同时为空,也不能同时有值 系统会校验音频内容,如有问题会返回错误码等信息" }, "sound_start_time": { "type": "integer", "description": "音频裁剪起点时间;以原始音频开始时间为准,开始时间为0分0秒,单位ms;起点之前的音频会被裁剪,裁剪后音频不得短于2秒" }, "sound_end_time": { "type": "integer", "description": "音频裁剪终点时间 终点时间不得晚于原始音频总时长" }, "sound_insert_time": { "type": "integer", "description": "裁剪后音频插入时间 插入音频的时间范围与该人脸可对口型时间区间至少重合2秒时长 插入音频的开始时间不得早于视频开始时间,插入音频的结束时间不得晚于视频结束时间" }, "sound_volume": { "type": "integer", "description": "音频音量大小;值越大,音量越大 取值范围:[0, 2]" }, "original_audio_volume": { "type": "integer", "description": "原始视频音量大小;值越大,音量越大取值范围:[0, 2];原视频无声时,当前参数无效果" } }, "x-apifox-orders": [ "face_id", "audio_id", "sound_file", "sound_start_time", "sound_end_time", "sound_insert_time", "sound_volume", "original_audio_volume" ], "required": [ "face_id", "sound_start_time", "sound_end_time", "sound_insert_time", "sound_volume", "original_audio_volume" ] }, "description": "指定人脸对口型;包括人脸ID、口型参考等内容等;暂时仅支持指定单人对口型" }, "external_task_id": { "type": "string" }, "callback_url": { "type": "string" } }, "required": [ "session_id", "face_choose" ], "x-apifox-orders": [ "session_id", "face_choose", "external_task_id", "callback_url" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"session_id\": \"825465778199224380\",\r\n \"face_choose\": [\r\n {\r\n \"face_id\": \"-1\",\r\n \"audio_id\": \"825451760499568680\",\r\n \"sound_file\": \"\",\r\n \"sound_start_time\": 0,\r\n \"sound_end_time\": 5000,\r\n \"sound_insert_time\": 1000,\r\n \"sound_volume\": 1.0,\r\n \"original_audio_volume\": 1.0\r\n }\r\n ],\r\n \"external_task_id\": \"\",\r\n \"callback_url\": \"\"\r\n}" } ], "oasExtensions": "" }
响应
[ { "id": 184216473, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]