Synchronous TTS HTTP
Authorizations
Pass Authorization: Bearer <token> in the request header.
Headers
Media type of the request body. Set to application/json to ensure the request data is in JSON format.
application/json Body
Model version. Available options: speech-2.8-hd, speech-2.8-turbo, speech-2.6-hd, speech-2.6-turbo, speech-02-hd, speech-02-turbo.
speech-2.8-hd, speech-2.8-turbo, speech-2.6-hd, speech-2.6-turbo, speech-02-hd, speech-02-turbo Text to be synthesized into speech. Maximum length is less than 10000 characters. If the text exceeds 3000 characters, streaming output is recommended.
-
Use newline characters to mark paragraph breaks.
-
Pause control: Supports custom speech time intervals between text segments for customized pause effects. Usage: Insert
<#x#>markers in the text, wherexis the pause duration in seconds, range [0.01, 99.99], with up to two decimal places. Pause markers must be placed between two pronounceable text segments; consecutive pause markers are not supported. -
Inline pronunciation replacement: Wrap Mandarin Pinyin (with tone numbers
1–5), IPA symbols, or Cantonese Pinyin (with tone numbers1–6) in English parentheses to temporarily override the pronunciation of problematic words or polyphonic characters."The word live is pronounced (lɪv) as a verb and (laɪv) as an adjective.""This is (he2)平, not (huo4)面.""去街市買啲(sung3)。"
-
Emotion tag: Only when model is
speech-2.8-hdorspeech-2.8-turbo, emotion tags can be inserted in the text. Supported tags:(laughs),(chuckle),(coughs),(clear-throat),(groans),(breath),(pant),(inhale),(exhale),(gasps),(sniffs),(sighs),(snorts),(burps),(lip-smacking),(humming),(hissing),(emm),(sneezes).
Controls whether to use streaming output. Defaults to false (non-streaming).
Whether to enhance recognition for specific minority languages and dialects. Defaults to null. Can be set to auto for the model to determine automatically.
Note: speech-02 series models do not support Persian, Filipino, and Tamil.
Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, Afrikaans, auto Voice effect settings. Supported audio formats:
- Non-streaming:
mp3,wav,flac - Streaming:
mp3
Controls whether to enable subtitle service. Defaults to false. Only effective for speech-2.8-hd, speech-2.8-turbo, speech-2.6-hd, speech-2.6-turbo, speech-02-hd, speech-02-turbo models.
Subtitle granularity. Defaults to sentence. Available values:
sentence: Sentence-level timestampsword: Word-level timestampsword_streaming: Streaming-optimized word-level timestamps, only effective whenstream=true.
sentence, word, word_streaming Controls the output format. Available values: [url, hex]. Defaults to hex. This parameter only takes effect in non-streaming mode; streaming mode only returns hex format. Returned URLs are valid for 24 hours.
url, hex Controls whether to add an audio rhythm identifier at the end of the synthesized audio. Defaults to false. This parameter only takes effect for non-streaming synthesis.