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
Заголовок раздела «Примечание к API»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 # Создать задачуGET /v1/queue/kling-lip-sync/requests/{request_id}/status # Проверить статусGET /v1/queue/kling-lip-sync/requests/{request_id}/response # Получить результатPUT /v1/queue/kling-lip-sync/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»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 string required»Session ID, generated by the face identification interface
face_choose array required
Заголовок раздела «face_choose array required»Specify face for lip sync, including face ID, audio reference, etc. Currently only supports single person lip sync
face_id
Заголовок раздела «face_id string required»stringrequiredFace ID, returned by the face identification interface
audio_id
Заголовок раздела «audio_id string»stringAudio ID generated by the preview interface
Only supports audio generated within 30 days, with duration between
2and60secondsEither
audio_idorsound_filemust be provided, but not both at the same time
sound_file
Заголовок раздела «sound_file string»stringAudio file
Supports Base64 encoded audio or audio URL (must be accessible)
Supported formats:
.mp3,.wav,.m4a, file size max5MB. Format mismatch or oversized file will return error codeOnly supports audio with duration between
2and60secondsEither
audio_idorsound_filemust be provided, but not both at the same timeSystem will validate audio content, issues will return error code
sound_start_time
Заголовок раздела «sound_start_time long required»longrequiredAudio 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
2seconds
sound_end_time
Заголовок раздела «sound_end_time long required»longrequiredAudio 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
2secondsEnd time must not exceed the original audio total duration
sound_insert_time
Заголовок раздела «sound_insert_time long required»longrequiredInsert 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
2secondsInsert 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
Заголовок раздела «sound_volume float»floatAudio volume; higher value means louder volume
Range:
0-2Default:
1
original_audio_volume
Заголовок раздела «original_audio_volume float»floatOriginal 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
Заголовок раздела «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_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}| Поле | Тип | Описание |
|---|---|---|
request_id | string | Идентификатор задачи для последующей проверки статуса, получения результата и отмены. |
response_url | string | URL для получения итогового результата. |
status_url | string | URL для проверки статуса задачи. |
cancel_url | string | URL для отмены задачи. |
queue_position | int | Текущая позиция в очереди. |