Kling TTS
kling-tts
Kirin TTS text-to-speech model for synthesizing audio from text with selectable voice and speech speed.
Эндпоинты
Заголовок раздела «Эндпоинты»POST /v1/queue/kling-tts # Создать задачуGET /v1/queue/kling-tts/requests/{request_id}/status # Проверить статусGET /v1/queue/kling-tts/requests/{request_id}/response # Получить результатPUT /v1/queue/kling-tts/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»curl --request 'POST' 'https://odirouter.ai/model/v1/queue/kling-tts' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --location \ --data-raw '{ "text": "Throughout my time in college, several memorable event left a significant impact on my life", "voice_id": "oversea_male1", "voice_language": "en", "voice_speed": 1}'text string required
Заголовок раздела «text string required»Text to synthesize into audio
Maximum length: 1000 characters. Overlong content returns an error.
The system validates text content and returns an error if the content cannot be processed.
voice_id string required
Заголовок раздела «voice_id string required»Voice ID
Multiple voices are available. Voice IDs are tied to voice language; use a voice ID that matches the voice_language value.
Voice preview uses fixed preview text and does not support custom preview text.
Voice preview file naming convention: voice_name#voice_id#voice_language
voice_language string required
Заголовок раздела «voice_language string required»Voice language
Default: zh
Options: zh, en
The voice language must match the selected voice_id.
voice_speed float
Заголовок раздела «voice_speed float»Speech speed
Default: 1.0
Valid range: 0.8 - 2.0
Precision: 1 decimal place. Extra decimal places are rounded automatically.
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-tts/requests/task_01hxyz.../response", "status_url": "https://odirouter.ai/model/v1/queue/kling-tts/requests/task_01hxyz.../status", "cancel_url": "https://odirouter.ai/model/v1/queue/kling-tts/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 | Текущая позиция в очереди. |