Lip-Sync
Re-sync the mouth of a person in an existing video to new audio. It needs a session_id and a
face_id from Face Recognition, and audio from
Text to Speech (audio_id) or your own file (sound_file).
POST
https://llm.siraya.ai/v1/avatar/lip-sync
GET
https://llm.siraya.ai/v1/avatar/lip-sync/{id}
Send async: true
Same as Clip Generation: without it the call blocks until the video is
finished. With "async": true you get an id back and poll
GET /v1/avatar/lip-sync/{id} until status is completed or failed.
Supported Models
| Model ID | Description |
|---|---|
kling-lip-sync |
Lip-sync a face in a video to new audio |
Request
| Field | Type | Required | Details |
|---|---|---|---|
model |
string | Yes | kling-lip-sync |
session_id |
string | Yes | From Face Recognition (vsess_…) |
face_choose |
array | Yes | Exactly one entry — one person only, for now |
watermark_info |
object | No | {"enabled": true} |
async |
boolean | Recommended | true |
Each face_choose[] entry:
| Field | Type | Required | Details |
|---|---|---|---|
face_id |
string | Yes | From face recognition's faces[] |
audio_id |
string | one of two | From Text to Speech. Duration 2–60 s |
sound_file |
string | one of two | Audio URL or base64. Duration 2–60 s |
sound_start_time |
integer | Yes | ms — start of the crop within the audio |
sound_end_time |
integer | Yes | ms — end of the crop; the crop must be ≥2 s |
sound_insert_time |
integer | Yes | ms — where in the video the audio lands; must overlap the face's interval by ≥2 s |
sound_volume |
float | No | 0–2, default 1 |
original_audio_volume |
float | No | 0–2, default 1. No effect if the source video is silent |
Example
curl https://llm.siraya.ai/v1/avatar/lip-sync \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "kling-lip-sync",
"session_id": "<SESSION_ID>",
"face_choose": [{
"face_id": "-1",
"audio_id": "<AUDIO_ID>",
"sound_start_time": 0,
"sound_end_time": 3000,
"sound_insert_time": 0,
"sound_volume": 1,
"original_audio_volume": 1
}],
"async": true
}'
Response
Same shape as Clip Generation. vendor_data.mode is "lip_sync";
output is h264 + AAC (e.g. 1920×1072, "duration": "4.966"). Poll the lip-sync endpoint, not the
avatar one:
See also the shared errors and unsupported parameters for the avatar family.