Skip to content
API Reference

Text to Speech

Turn a script into a voice track. The returned audio_id is the audio input for Clip Generation and Lip-Sync.

POST https://llm.siraya.ai/v1/audio/tts

Synchronous: the finished audio comes back on this response — no polling.

Supported Models

Model ID Description
kling-tts Text-to-speech for the avatar family

Request

Field Type Required Details
model string Yes kling-tts
text string Yes Script, max 1000 characters
voice_id string Yes Voice ID — see the Kling AI Voice List (entries are named Voice Name#Voice ID#Voice Language, e.g. oversea_male1)
voice_language string Yes zh or en — must match the voice. A mismatched pair is rejected (Voice id not found)
voice_speed float No 0.8–2.0, default 1.0

This is not /v1/audio/speech

The field names differ from the OpenAI speech endpoint: use text not input, voice_id not voice, voice_speed not speed. The OpenAI spellings are refused with a hint. Any other unknown key is also refused by name, so a typo'd parameter fails loudly instead of being silently dropped.

Example

curl https://llm.siraya.ai/v1/audio/tts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "kling-tts",
    "text": "Hello from Siraya AI, this is a lip sync test.",
    "voice_id": "oversea_male1",
    "voice_language": "en",
    "voice_speed": 1
  }'

Response

{
    "audio_id": "vaud_s7LuUGTtOUT4QykIKDg2eEINdBz4UBrVcdNFOwiQNXuOcdbcBCXE...",
    "url": "https://.../output.mp3?Expires=...",
    "duration": 7.02,
    "vendor_data": { "created_at": 1791772971904, "updated_at": 1791772973873 }
}
Field Meaning
audio_id The platform's audio handle (vaud_…). Valid for 30 days. Pass it to a clip-generation or lip-sync request as-is
url Signed audio URL — download it if you need to keep the file
duration Audio length in seconds

See also the shared errors and unsupported parameters for the avatar family.