> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubeuaeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# kling-lip-sync

> Create an asynchronous lip-sync video task. The character's mouth movement is aligned with the provided speech.



## OpenAPI

````yaml en/api-reference/model-api/kuaishou/openapi/kling-lip-sync/openapi.yaml POST /kling/v1/videos/advanced-lip-sync
openapi: 3.1.0
info:
  title: Kling lip-sync
  description: >-
    Drive the character's mouth movement to match speech from text (TTS) or an
    audio file
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/advanced-lip-sync:
    post:
      summary: Create a lip-sync task
      description: >
        Create an asynchronous lip-sync video task. The character's mouth
        movement is aligned with the provided speech.


        **Prerequisite**: call the `identify-face` API first to get a
        `session_id`.


        Two input modes are supported:

        - **Text mode**: provide `text`, `voice_id`, and `voice_language`. The
        platform synthesizes speech with built-in TTS and drives lip movement.

        - **Audio mode**: provide `audio_url` and drive lip movement from an
        existing audio file.


        After submitting, poll `GET
        /kling/v1/videos/advanced-lip-sync/{task_id}` until `status` is
        `succeeded`。
      operationId: klingAdvancedLipSyncZh
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - input
              properties:
                input:
                  type: object
                  required:
                    - session_id
                  properties:
                    session_id:
                      type: string
                      description: Session ID returned by the face identification API.
                      example: abc123-session-id
                    face_image_url:
                      type: string
                      description: >-
                        Face reference image URL (optional, improves character
                        consistency).
                    text:
                      type: string
                      description: >
                        Text the character should speak (text mode). Use either
                        this or `audio_url`.
                      example: Hello, welcome to my channel
                    voice_id:
                      type: string
                      description: TTS voice ID (required in text mode).
                      example: girlfriend_1_cn
                    voice_language:
                      type: string
                      description: Language code (required in text mode).
                      enum:
                        - zh
                        - en
                      example: zh
                    audio_url:
                      type: string
                      description: >
                        Public URL of the audio file (audio mode). Use either
                        this or `text`.
                      example: https://example.com/speech.mp3
      responses:
        '200':
          description: Lip-sync task created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task ID
                    example: task_abc123
                  task_id:
                    type: string
                    description: Task ID (same as id)
                    example: task_abc123
                  object:
                    type: string
                    example: video
                  model:
                    type: string
                    example: kling-lip-sync
                  status:
                    type: string
                    description: >-
                      Initially empty. Use the query API to get the latest
                      status.
                    example: ''
                  progress:
                    type: integer
                    description: Progress 0–100
                    example: 0
                  created_at:
                    type: integer
                    description: Unix timestamp
                    example: 1773812605
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````