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.
API Notes
Section titled “API Notes”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
Endpoints
Section titled “Endpoints”POST /v1/queue/kling-lip-sync # Create taskGET /v1/queue/kling-lip-sync/requests/{request_id}/status # Check statusGET /v1/queue/kling-lip-sync/requests/{request_id}/response # Get resultPUT /v1/queue/kling-lip-sync/requests/{request_id}/cancel # Cancel taskRequest parameters
Section titled “Request parameters”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, generated by the face identification interface
Specify face for lip sync, including face ID, audio reference, etc. Currently only supports single person lip sync
Face ID, returned by the face identification interface
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
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
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
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
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
Audio volume; higher value means louder volume
Range: 0 - 2
Default: 1
Original video volume; higher value means louder volume
When original video has no audio, this parameter has no effect
Range: 0 - 2
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 notification URL for this task result. If configured, server will actively notify when task status changes
Response parameters
Section titled “Response parameters”{ "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}| Field | Type | Description |
|---|---|---|
request_id | string | Task ID used for all follow-up operations. |
response_url | string | URL to fetch the final result. |
status_url | string | URL to query task status. |
cancel_url | string | URL to cancel the task. |
queue_position | int | Current queue position. |