Kling
Create a Kling advanced lip-sync task
Create advanced lip-sync video tasks via CometAPI Kling POST /kling/v1/videos/advanced-lip-sync, submit audio and counterpart settings to generate synced results.
POST
cURL
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_idand availableface_idvalues - Build one or more
face_chooseentries that map each face to an audio segment - Use
audio_idfor audio produced by a prior task, orsound_filefor a hosted audio file - Send timing fields in milliseconds. For example,
sound_start_time: "0"andsound_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_urlorexternal_task_idonly when you need webhook delivery or your own tracking id
Task flow
Identify faces first
Run Lip-Sync on the source video and keep the returned
session_id plus the target face_id values.Create the advanced lip-sync task
Submit
session_id and the face_choose array through this endpoint.Authorizations
Bearer token authentication. Use your CometAPI key.
Body
application/json
Session id returned by identify-face.
One or more face/audio mappings to synthesize.
Minimum array length:
1Webhook URL to receive task status updates.
Custom task id for your own tracking. Must be unique per account.