Speech Synthesis
Endpoint: POST https://4zapi.com/kling/v1/audio/tts
Parameters
Content-Type(header, string): Request body Content-Type, usually application/jsonAuthorization(header, string): Bearer API Key
Request body (application/json)
text(string, required): Script for synthesized audio; max length 1000; overly long text returns errors; system validates contentvoice_id(string, required): voice ID multiple system voices available, see voice effect / ID / language mapping; voice preview does not support custom text preview file naming: name#id#language TTS currently supports official voices only, not custom voicesvoice_language(string, required): Script for synthesized audio; max length 1000; overly long text returns errors; system validates contentvoice_speed(number): Speech rate 0.8–2.0, 1 decimal place; out-of-range values are rounded
Request example
{
"text": "描述看到的画面",
"voice_id": "genshin_vindi2",
"voice_language": "zh",
"voice_speed": 1
}