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

# Kling Lipsync Create

> Use DeerAPI to call the Kling Lipsync Create endpoint with request details, response details, examples, and an OpenAPI playground.

## Overview

Use this endpoint to call the Kling Lipsync Create workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.

## Before you start

Use the DeerAPI base URL and pass your API Key in the `Authorization` header:

```text theme={null}
https://api.deerapi.com
```

```text theme={null}
Authorization: Bearer $DEERAPI_KEY
```

## Model selection

Choose a current model ID from the [live pricing page](https://api.deerapi.com/pricing). Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.

## Implementation notes

* Use the OpenAPI playground for the exact request fields accepted by this endpoint.
* Keep API Keys on the server side when you build production applications.
* Log the request ID from failed calls so support can investigate the request.
* Retry `429`, `500`, and `503` responses with exponential backoff.


## OpenAPI

````yaml /api/openapi/video/kling/post-lipsync-create.openapi.json POST /kling/v1/videos/advanced-lip-sync
openapi: 3.1.0
info:
  title: DeerAPI Kling Lip Sync Task
  description: Use this field according to the endpoint schema.
  version: 1.0.0
servers:
  - url: https://api.deerapi.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/advanced-lip-sync:
    post:
      summary: DeerAPI Kling Lip Sync Task
      description: Use this field according to the endpoint schema.
      operationId: createKlingAdvancedLipSync
      requestBody:
        description: Use this field according to the endpoint schema.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - session_id
                - face_choose
              properties:
                session_id:
                  type: string
                  description: Use this field according to the endpoint schema.
                face_choose:
                  type: array
                  description: Use this field according to the endpoint schema.
                  items:
                    type: object
                    required:
                      - face_id
                      - sound_file
                      - sound_start_time
                      - sound_end_time
                      - sound_insert_time
                      - sound_volume
                      - original_audio_volume
                    properties:
                      face_id:
                        type: string
                        description: Use this field according to the endpoint schema.
                      sound_file:
                        type: string
                        description: Use this field according to the endpoint schema.
                      sound_start_time:
                        type: string
                        description: Use this field according to the endpoint schema.
                      sound_end_time:
                        type: string
                        description: Use this field according to the endpoint schema.
                      sound_insert_time:
                        type: string
                        description: Use this field according to the endpoint schema.
                      sound_volume:
                        type: string
                        description: Use this field according to the endpoint schema.
                      original_audio_volume:
                        type: string
                        description: Use this field according to the endpoint schema.
                callback_url:
                  type: string
                  description: Use this field according to the endpoint schema.
                external_task_id:
                  type: string
                  description: Use this field according to the endpoint schema.
            examples:
              default:
                summary: DeerAPI Kling Lip Sync Task
                value:
                  session_id: session_xxx
                  face_choose:
                    - face_id: '0'
                      sound_file: https://example.com/lipsync-audio.mp3
                      sound_start_time: '1200'
                      sound_end_time: '5000'
                      sound_insert_time: '0'
                      sound_volume: '1.0'
                      original_audio_volume: '0.5'
                  callback_url: https://example.com/kling/callback
            example:
              session_id: session_xxx
              face_choose:
                - face_id: '0'
                  sound_file: https://example.com/lipsync-audio.mp3
                  sound_start_time: '1200'
                  sound_end_time: '5000'
                  sound_insert_time: '0'
                  sound_volume: '1.0'
                  original_audio_volume: '0.5'
              callback_url: https://example.com/kling/callback
      responses:
        '200':
          description: Use this field according to the endpoint schema.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - request_id
                  - data
                properties:
                  code:
                    type: integer
                    description: Use this field according to the endpoint schema.
                  message:
                    type: string
                    description: Use this field according to the endpoint schema.
                  request_id:
                    type: string
                    description: Use this field according to the endpoint schema.
                  data:
                    type: object
                    required:
                      - task_id
                      - task_status
                      - task_info
                      - created_at
                      - updated_at
                    properties:
                      task_id:
                        type: string
                        description: Use this field according to the endpoint schema.
                      task_status:
                        type: string
                        description: Use this field according to the endpoint schema.
                      task_info:
                        type: object
                        properties:
                          external_task_id:
                            type: string
                            description: Use this field according to the endpoint schema.
                      created_at:
                        type: integer
                        description: Use this field according to the endpoint schema.
                      updated_at:
                        type: integer
                        description: Use this field according to the endpoint schema.
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |
            curl https://api.deerapi.com/kling/v1/videos/advanced-lip-sync \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $DEERAPI_KEY" \
              -d '{
                "session_id": "session_xxx",
                "face_choose": [
                  {
                    "face_id": "0",
                    "sound_file": "https://example.com/lipsync-audio.mp3",
                    "sound_start_time": "1200",
                    "sound_end_time": "5000",
                    "sound_insert_time": "0",
                    "sound_volume": "1.0",
                    "original_audio_volume": "0.5"
                  }
                ],
                "callback_url": "https://example.com/kling/callback"
              }'
        - lang: Python
          label: requests
          source: |
            import os
            import requests

            url = "https://api.deerapi.com/kling/v1/videos/advanced-lip-sync"
            headers = {
                "Authorization": "Bearer " + os.environ["DEERAPI_KEY"],
                "Content-Type": "application/json",
            }
            payload = {
              "session_id": "session_xxx",
              "face_choose": [
                {
                  "face_id": "0",
                  "sound_file": "https://example.com/lipsync-audio.mp3",
                  "sound_start_time": "1200",
                  "sound_end_time": "5000",
                  "sound_insert_time": "0",
                  "sound_volume": "1.0",
                  "original_audio_volume": "0.5"
                }
              ],
              "callback_url": "https://example.com/kling/callback"
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.json())
        - lang: JavaScript
          label: fetch
          source: >
            const response = await
            fetch("https://api.deerapi.com/kling/v1/videos/advanced-lip-sync", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.DEERAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "session_id": "session_xxx",
                "face_choose": [
                  {
                    "face_id": "0",
                    "sound_file": "https://example.com/lipsync-audio.mp3",
                    "sound_start_time": "1200",
                    "sound_end_time": "5000",
                    "sound_insert_time": "0",
                    "sound_volume": "1.0",
                    "original_audio_volume": "0.5"
                  }
                ],
                "callback_url": "https://example.com/kling/callback"
              }),
            });


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a DeerAPI API Key as a Bearer token.

````