⌘K

Kirin TTS

kirin_tts

Kirin TTS text-to-speech model for synthesizing audio from text with selectable voice and speech speed.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID used for the request

Value: kirin_tts


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

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

Default: zh

Options: zh, en

The voice language must match the selected voice_id.


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


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.

Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.