Skip to main content
POST
/
kling
/
v1
/
videos
/
advanced-lip-sync
cURL
curl https://api.cometapi.com/kling/v1/videos/advanced-lip-sync \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "session_id": "<session_id>",
      "face_choose": [
        {
          "face_id": "<face_id>",
          "sound_file": "https://your-audio-host/speech.wav",
          "sound_start_time": "0",
          "sound_end_time": "2000",
          "sound_insert_time": "0",
          "sound_volume": 1,
          "original_sound_volume": 0
        }
      ]
    }'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123
  }
}
Use this endpoint to create an advanced lip-sync task after you already identified faces in the source video.

Before you call it

  • Start with Lip-Sync to get the session_id and available face_id values
  • Build one or more face_choose entries that map each face to an audio segment
  • Use audio_id for audio produced by a prior task, or sound_file for a hosted audio file
  • Send timing fields in milliseconds. For example, sound_start_time: "0" and sound_end_time: "2000" select the first 2 seconds.
  • Make sure the clipped audio segment is at least 2000 ms and does not exceed the source audio duration
  • Set callback_url or external_task_id only when you need webhook delivery or your own tracking id

Task flow

1

Identify faces first

Run Lip-Sync on the source video and keep the returned session_id plus the target face_id values.
2

Create the advanced lip-sync task

Submit session_id and the face_choose array through this endpoint.
3

Track the generated task

Save the returned task id for status checks and final result retrieval.
For the complete parameter reference, see the official Kling documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Body

application/json
session_id
string
required

Session id returned by identify-face.

face_choose
object[]
required

One or more face/audio mappings to synthesize.

Minimum array length: 1
callback_url
string

Webhook URL to receive task status updates.

external_task_id
string

Custom task id for your own tracking. Must be unique per account.

Response

200 - application/json

Task accepted.

code
integer
required
message
string
required
data
object
required