POST /kling/v1/audio/tts, followed by avatar generation at POST /kling/v1/videos/avatar/image2video.
TTS is a standalone synchronous API. Avatar generation is asynchronous. If you already have a supported audio file, skip TTS and pass the file with
sound_file.Workflow
1
Prepare speech
Call TTS to convert text into audio and read
data.task_result.audios[0].id, or provide your own public audio URL.2
Create the avatar task
Submit a portrait with either
audio_id or sound_file. The two audio fields are mutually exclusive.3
Poll by task ID
Read
task_id from the creation response and poll GET /kling/v1/videos/avatar/image2video/{task_id} until data.task_status is succeed or failed.4
Save the result
On success, download
data.task_result.videos[0].url. Generated media can expire, so copy it to your own storage promptly.Supported inputs
When you send raw Base64, omit prefixes such as
data:image/png;base64,.
Create speech with TTS
cURL
voice_id selects the TTS voice. Choose an ID from the Kling AI Voice List and set voice_language to the language shown for that voice. The returned audio id is an audio_id; these values are not interchangeable.
Generate a digital human video
- Use a TTS audio ID
- Use your own audio
cURL
task_id or id.
Query the task
cURL
data.task_status through submitted and processing. These intermediate states can repeat or move between each other, so do not treat a state change as a failure. Stop only when the status becomes succeed or failed.
Choose between std and pro
Use std for lower-cost previews and ordinary talking-head content. Use pro when output detail matters more. In live validation, both modes produced decodable videos with audio, and pro produced a higher-resolution result than std.
Digital Human API Reference
Review every supported request and response field for TTS and avatar generation.