1. kling
梧柏API使用文档
WHBAI · Kling
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • 可灵 Kling
    • 文生音效
    • 文生视频
    • 图生视频
    • 文生图
    • 查询文生视频任务
    • Omni-Video
  • kling
    • 对口型
      POST
    • 虚拟试穿
      POST
    • 视频延长
      POST
    • 视频特效
      POST
    • 多图参考生视频
      POST
    • 查询任务(免费)
      GET
    • 查询任务(单个)
      GET
    • Omni-Image
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 初始化待编辑视频
      POST
    • 增加视频选区
      POST
    • 删减视频选区
      POST
    • 预览已选区视频
      POST
    • 多模态视频
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 多图参考生图
      POST
    • 查询任务(单个)
      GET
    • 文生视频
      POST
    • 图生视频
      POST
    • 查询视频
      GET
    • 查询任务(单个)
      GET
    • 扩图
      POST
    • 查询任务(单个)
      GET
    • 图像识别
      POST
    • 数字人
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 视频生音效
      POST
    • 查询任务(单个)
      GET
    • 语音合成
      POST
    • 查询任务(单个)
      GET
    • 人脸识别
      POST
    • 对口型
      POST
    • 查询任务(单个)
      GET
    • 自定义音色
      POST
    • 查询自定义音色(单个)
      GET
    • 查询官方音色
      GET
    • 删除自定义音色
      POST
    • 动作控制
      POST
    • 查询任务(单个)
      GET
    • 主体(旧)
      POST
    • 主体(新版本)
      POST
    • 查询自定义主体(单个新版本)
      GET
    • 查询官方主体(列表新版本)
      GET
    • 删除自定义主体(新版本)
      POST
  • 数据模型
    • KlingTaskSubmitResponse
    • KlingTaskQueryResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • PostKlingV1ImagesGenerationsRequest
    • KlingOmniVideoRequest
    • NewApiError
  1. kling

对口型

POST
/kling/v1/videos/advanced-lip-sync

网站中的模型与调用示例#

对口型#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "callback_url": {
      "type": "string"
    },
    "external_task_id": {
      "type": "string"
    },
    "face_choose": {
      "description": "指定人脸对口型;包括人脸ID、口型参考等内容等;暂时仅支持指定单人对口型",
      "items": {
        "properties": {
          "audio_id": {
            "description": "通过试听接口生成的音频的ID仅支持使用30天内生成的、时长不短于2秒且不超过60秒的音频/audio_id、sound_file参数二选一,不能同时为空,也不能同时有值",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Audio ID from preview API. Only last-30-day audio lasting 2–60s. Exactly one of audio_id or sound_file"
              }
            }
          },
          "face_id": {
            "description": "人脸ID由人脸识别接口返回",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "face ID returned by the face recognition API"
              }
            }
          },
          "original_audio_volume": {
            "description": "原始视频音量大小;值越大,音量越大取值范围:[0, 2];原视频无声时,当前参数无效果",
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "Original video volume; higher=louder; range [0,2]; no effect if original is silent"
              }
            }
          },
          "sound_end_time": {
            "description": "音频裁剪终点时间 终点时间不得晚于原始音频总时长",
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "audio clip end time end time must not exceed original audio duration"
              }
            }
          },
          "sound_file": {
            "description": "音频文件 支持传入音频Base64编码或图音频URL(确保可访问) 音频文件支持.mp3/.wav/.m4a,文件大小不超过5MB,格式不匹配或文件过大会返回错误码等信息 仅支持使用时长不短于2秒且不长于60秒的音频 audio_id、sound_file参数二选一,不能同时为空,也不能同时有值 系统会校验音频内容,如有问题会返回错误码等信息",
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Audio file. Base64 or reachable URL; .mp3/.wav/.m4a; ≤5MB; duration 2–60s. Exactly one of audio_id or sound_file. Invalid format/size or content issues return errors"
              }
            }
          },
          "sound_insert_time": {
            "description": "裁剪后音频插入时间 插入音频的时间范围与该人脸可对口型时间区间至少重合2秒时长 插入音频的开始时间不得早于视频开始时间,插入音频的结束时间不得晚于视频结束时间",
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "insert time of the cropped audio insert range must overlap the lip-syncable face interval by ≥2s insert start must not be before video start, insert end must not be after video end"
              }
            }
          },
          "sound_start_time": {
            "description": "音频裁剪起点时间;以原始音频开始时间为准,开始时间为0分0秒,单位ms;起点之前的音频会被裁剪,裁剪后音频不得短于2秒",
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "audio clip start time;relative to original audio start (0:00), unit: ms;audio before the start is trimmed, trimmed audio must be at least 2 seconds"
              }
            }
          },
          "sound_volume": {
            "description": "音频音量大小;值越大,音量越大 取值范围:[0, 2]",
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "Audio volume; higher=louder; range [0, 2]"
              }
            }
          }
        },
        "required": [
          "face_id",
          "sound_start_time",
          "sound_end_time",
          "sound_insert_time",
          "sound_volume",
          "original_audio_volume"
        ],
        "type": "object"
      },
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "specify a face for lip-sync;includes face ID, lip-sync reference, etc.;currently only single-person lip-sync"
        }
      }
    },
    "session_id": {
      "description": "会话ID,会基于对口型人脸识别接口生成",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "session ID from the lip-sync face recognition API"
        }
      }
    }
  },
  "required": [
    "session_id",
    "face_choose"
  ]
}

请求示例 · 示例 1#

{
  "callback_url": "",
  "external_task_id": "",
  "face_choose": [
    {
      "audio_id": "825451760499568680",
      "face_id": "-1",
      "original_audio_volume": 1,
      "sound_end_time": 5000,
      "sound_file": "",
      "sound_insert_time": 1000,
      "sound_start_time": 0,
      "sound_volume": 1
    }
  ],
  "session_id": "825465778199224380"
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json必填

示例
{
    "callback_url": "",
    "external_task_id": "",
    "face_choose": [
        {
            "audio_id": "825451760499568680",
            "face_id": "-1",
            "original_audio_volume": 1,
            "sound_end_time": 5000,
            "sound_file": "",
            "sound_insert_time": 1000,
            "sound_start_time": 0,
            "sound_volume": 1
        }
    ],
    "session_id": "825465778199224380"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/kling/v1/videos/advanced-lip-sync' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "callback_url": "",
    "external_task_id": "",
    "face_choose": [
        {
            "audio_id": "825451760499568680",
            "face_id": "-1",
            "original_audio_volume": 1,
            "sound_end_time": 5000,
            "sound_file": "",
            "sound_insert_time": 1000,
            "sound_start_time": 0,
            "sound_volume": 1
        }
    ],
    "session_id": "825465778199224380"
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "data": {
        "task_id": "task_example_001"
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:09
上一页
人脸识别
下一页
查询任务(单个)
Built with