POST
/kling/v1/videos/advanced-lip-sync对口型
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/kling/v1/videos/advanced-lip-sync \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"session_id": "825465778199224380",
"face_choose": [
{
"face_id": "-1",
"audio_id": "825451760499568680",
"sound_file": "",
"sound_start_time": 0,
"sound_end_time": 5000,
"sound_insert_time": 1000,
"sound_volume": 1.0,
"original_audio_volume": 1.0
}
],
"external_task_id": "",
"callback_url": ""
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Content-Type | Header | string | 否 | - | application/json |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
session_id | JSON body | string | 是 | 会话ID,会基于对口型人脸识别接口生成 | - |
face_choose | JSON body | array<object> | 是 | 指定人脸对口型;包括人脸ID、口型参考等内容等;暂时仅支持指定单人对口型 | - |
face_choose[].face_id | JSON body | string | 是 | 人脸ID由人脸识别接口返回 | - |
face_choose[].audio_id | JSON body | string | 否 | 通过试听接口生成的音频的ID仅支持使用30天内生成的、时长不短于2秒且不超过60秒的音频/audio_id、sound_file参数二选一,不能同时为空,也不能同时有值 | - |
face_choose[].sound_file | JSON body | string | 否 | 音频文件 支持传入音频Base64编码或图音频URL(确保可访问) 音频文件支持.mp3/.wav/.m4a,文件大小不超过5MB,格式不匹配或文件过大会返回错误码等信息 仅支持使用时长不短于2秒且不长于60秒的音频 audio_id、sound_file参数二选一,不能同时为空,也不能同时有值 系统会校验音频内容,如有问题会返回错误码等信息 | - |
face_choose[].sound_start_time | JSON body | integer | 是 | 音频裁剪起点时间;以原始音频开始时间为准,开始时间为0分0秒,单位ms;起点之前的音频会被裁剪,裁剪后音频不得短于2秒 | - |
face_choose[].sound_end_time | JSON body | integer | 是 | 音频裁剪终点时间 终点时间不得晚于原始音频总时长 | - |
face_choose[].sound_insert_time | JSON body | integer | 是 | 裁剪后音频插入时间 插入音频的时间范围与该人脸可对口型时间区间至少重合2秒时长 插入音频的开始时间不得早于视频开始时间,插入音频的结束时间不得晚于视频结束时间 | - |
face_choose[].sound_volume | JSON body | integer | 是 | 音频音量大小;值越大,音量越大 取值范围:[0, 2] | - |
face_choose[].original_audio_volume | JSON body | integer | 是 | 原始视频音量大小;值越大,音量越大取值范围:[0, 2];原视频无声时,当前参数无效果 | - |
external_task_id | JSON body | string | 否 | - | - |
callback_url | JSON body | string | 否 | - | - |
返回响应 (200)
此部分没有定义参数。
来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899819,
"name": "对口型",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/kling/v1/videos/advanced-lip-sync",
"tags": [],
"status": -1,
"requestBody": {
"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"
]
},
"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}"
}
],
"mediaType": "",
"oasExtensions": "",
"required": true,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "6VqSIt7n3n",
"name": "Content-Type",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "duM1EaJS07",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 119006280,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": []
}
],
"responseExamples": [],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436156,
"ordering": 6,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}