Перейти к содержимому
Главная

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. Voices that are no longer needed can be deleted via API.

Note: Maximum length is 20 characters


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


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


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_idstringИдентификатор задачи для последующей проверки статуса, получения результата и отмены.
response_urlstringURL для получения итогового результата.
status_urlstringURL для проверки статуса задачи.
cancel_urlstringURL для отмены задачи.
queue_positionintТекущая позиция в очереди.