Skip to content
Home

Kling Lipsync

kling-lip-sync

Kirin Lipsync lip sync video generation model. Supports text-to-video and audio-to-video lip sync modes for generating lip-synced videos.

The session_id and face_id parameters are returned by the kirin_identify_face API

You must first call the face identification API to obtain these values before using this lip-sync API

POST /v1/queue/kling-lip-sync # Create task
GET /v1/queue/kling-lip-sync/requests/{request_id}/status # Check status
GET /v1/queue/kling-lip-sync/requests/{request_id}/response # Get result
PUT /v1/queue/kling-lip-sync/requests/{request_id}/cancel # Cancel task
Окно терминала
curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-lip-sync' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--location \
--data-raw '{
"session_id": "949665381905347148",
"face_choose": [
{
"face_id": "0",
"sound_file": "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3",
"sound_start_time": 0,
"sound_end_time": 5000,
"sound_insert_time": 0,
"sound_volume": 1,
"original_audio_volume": 0.5
}
]
}'
session_id string required

Session ID, generated by the face identification interface

face_choose array required

Specify face for lip sync, including face ID, audio reference, etc. Currently only supports single person lip sync

face_id string required

Face ID, returned by the face identification interface

audio_id string

Audio ID generated by the preview interface

Only supports audio generated within 30 days, with duration between 2 and 60 seconds

Either audio_id or sound_file must be provided, but not both at the same time

sound_file string

Audio file

Supports Base64 encoded audio or audio URL (must be accessible)

Supported formats: .mp3, .wav, .m4a, file size max 5MB. Format mismatch or oversized file will return error code

Only supports audio with duration between 2 and 60 seconds

Either audio_id or sound_file must be provided, but not both at the same time

System will validate audio content, issues will return error code

sound_start_time long required

Audio clip start time

Based on original audio start time (0ms), unit: ms

Audio before this point will be clipped. Clipped audio must be at least 2 seconds

sound_end_time long required

Audio clip end time

Based on original audio start time (0ms), unit: ms

Audio after this point will be clipped. Clipped audio must be at least 2 seconds

End time must not exceed the original audio total duration

sound_insert_time long required

Insert time for clipped audio

Based on video start time (0ms), unit: ms

The inserted audio time range must overlap with the face lip sync available time interval by at least 2 seconds

Insert audio start time must not be earlier than video start time, insert audio end time must not be later than video end time

sound_volume float

Audio volume; higher value means louder volume

Range: 0 - 2

Default: 1

original_audio_volume float

Original video volume; higher value means louder volume

When original video has no audio, this parameter has no effect

Range: 0 - 2

external_task_id string

Custom task ID

User-defined task ID. Will not override system-generated task ID, but supports querying tasks by this ID

Please ensure uniqueness per user

callback_url string

Callback notification URL for this task result. If configured, server will actively notify when task status changes

{
"request_id": "task_01hxyz...",
"response_url": "https://odirouter.ai/model/v1/queue/kling-lip-sync/requests/task_01hxyz.../response",
"status_url": "https://odirouter.ai/model/v1/queue/kling-lip-sync/requests/task_01hxyz.../status",
"cancel_url": "https://odirouter.ai/model/v1/queue/kling-lip-sync/requests/task_01hxyz.../cancel",
"queue_position": 0
}
FieldTypeDescription
request_idstringTask ID used for all follow-up operations.
response_urlstringURL to fetch the final result.
status_urlstringURL to query task status.
cancel_urlstringURL to cancel the task.
queue_positionintCurrent queue position.