Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

Content-Type
enum<string>
default:application/json
required

Media type of the request body. Set to application/json to ensure the request data is in JSON format.

Available options:
application/json

Body

application/json
model
enum<string>
required

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.

Available options:
speech-2.8-hd,
speech-2.8-turbo,
speech-2.6-hd,
speech-2.6-turbo,
speech-02-hd,
speech-02-turbo
text
string
required

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, where x is 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 numbers 1–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-hd or speech-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).

stream
boolean

Controls whether to use streaming output. Defaults to false (non-streaming).

stream_options
object
voice_setting
object
audio_setting
object
pronunciation_dict
object
timbre_weights
object[]
language_boost
enum<string>

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.

Available options:
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_modify
object

Voice effect settings. Supported audio formats:

  • Non-streaming: mp3, wav, flac
  • Streaming: mp3
subtitle_enable
boolean
default:false

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_type
enum<string>
default:sentence

Subtitle granularity. Defaults to sentence. Available values:

  • sentence: Sentence-level timestamps
  • word: Word-level timestamps
  • word_streaming: Streaming-optimized word-level timestamps, only effective when stream=true.
Available options:
sentence,
word,
word_streaming
output_format
enum<string>
default:hex

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.

Available options:
url,
hex
aigc_watermark
boolean
default:false

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.

Response

data
object

Synthesized audio data object. May be null, so null-checking is required.

trace_id
string

Session ID for this request, used to help locate issues when consulting or providing feedback.

extra_info
object

Additional audio information.

base_resp
object

Status code and details for this request.