Kling Custom Voices
kling-custom-voices
Voice customization API for creating custom voices from audio/video files or historical work IDs.
Эндпоинты
Заголовок раздела «Эндпоинты»POST /v1/queue/kling-custom-voices # Создать задачуGET /v1/queue/kling-custom-voices/requests/{request_id}/status # Проверить статусGET /v1/queue/kling-custom-voices/requests/{request_id}/response # Получить результатPUT /v1/queue/kling-custom-voices/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-custom-voices' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --location \ --data-raw '{ "voice_url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/out.mp3", "voice_name": "定制人声"}'voice_name string required
Заголовок раздела «voice_name string required»Voice name. Voices that are no longer needed can be deleted via API.
Note: Maximum length is 20 characters
voice_url string
Заголовок раздела «voice_url string»URL to the voice data file
Supported formats: .mp3 / .wav / .mp4 / .mov
The audio must contain only one clean human voice with no background noise; duration must be between 5 and 30 seconds
video_id string
Заголовок раздела «video_id string»Historical work ID. Provides audio material by referencing a previously generated work.
Only videos meeting the following conditions can be used for voice customization:
Videos generated with V2.6 model with sound parameter set to on
Videos generated via the Digital Human API
Videos generated via the Lip Sync API
Note: The audio must contain only one clean human voice with no background noise; duration must be between 5 and 30 seconds
callback_url string
Заголовок раздела «callback_url string»Callback URL
external_task_id string
Заголовок раздела «external_task_id string»Custom task ID. Does not override the system-generated task ID but can be used to query the task.
Note: Must be unique per user.
Параметры ответа
Заголовок раздела «Параметры ответа»{ "request_id": "task_01hxyz...", "response_url": "https://odirouter.ai/model/v1/queue/kling-custom-voices/requests/task_01hxyz.../response", "status_url": "https://odirouter.ai/model/v1/queue/kling-custom-voices/requests/task_01hxyz.../status", "cancel_url": "https://odirouter.ai/model/v1/queue/kling-custom-voices/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 | Текущая позиция в очереди. |