Skip to content

对口型

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/videos/advanced-lip-sync:
    post:
      summary: 对口型
      deprecated: false
      description: ''
      tags:
        - 可灵 Kling 平台/对口型
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              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
            example:
              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
                  original_audio_volume: 1
              external_task_id: ''
              callback_url: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 可灵 Kling 平台/对口型
      x-apifox-status: testing
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-386403357-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务