> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax Speech 2.8 HD Asynchronous Speech Synthesis

Use this endpoint to create an asynchronous speech synthesis task. It supports text or file input. Text input is limited to a maximum of 50,000 characters, and file input is limited to a maximum of 100,000 characters.

<Tip>
  This is an **asynchronous** API and only returns the task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="text" type="string">
  The text to synthesize into audio, limited to a maximum of 50,000 characters. Either `text` or `text_file_id` is required<br /><br />• Vocalization tags: Only when the model is `speech-2.8-hd` or `speech-2.8-turbo`, vocalization tags can be inserted into the text. Supported vocalizations: `(laughs)` (laughter), `(chuckle)` (chuckle), `(coughs)` (cough), `(clear-throat)` (clear throat), `(groans)` (groan), `(breath)` (normal breathing), `(pant)` (panting), `(inhale)` (inhale), `(exhale)` (exhale), `(gasps)` (gasp), `(sniffs)` (sniff), `(sighs)` (sigh), `(snorts)` (snort), `(burps)` (burp), `(lip-smacking)` (lip smacking), `(humming)` (humming), `(hissing)` (hissing), `(emm)` (um), `(whistles)` (whistle), `(sneezes)` (sneeze), `(crying)` (sobbing), `(applause)` (applause)
</ParamField>

<ParamField body="text_file_id" type="integer">
  The text file id to synthesize into audio. A single file must be less than 100,000 characters. Supported file formats: txt, zip. Either `text_file_id` or `text` is required. The format is automatically validated after being passed in.<br />• **txt file**: length limit \<100000 characters. Supports using `&lt;#x#&gt;` to mark custom pauses. x is the pause duration (unit: seconds), with a range of \[0.01, 99.99], and up to two decimal places. Note that pauses must be set between two pieces of text that can be pronounced, and multiple pause markers cannot be used consecutively<br />• **zip file**:<br />• The compressed package must contain txt or json files in the same format.<br />• json file format: supports three fields: \[`title`, `content`, `extra`], representing the title, body, and additional information respectively. If all three fields exist, 3 groups of results are produced, for a total of 9 files, all stored in one folder. If a field does not exist or its content is empty, no corresponding result will be generated for that field
</ParamField>

<ParamField body="voice_modify" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="pitch" type="integer">
      Pitch adjustment (deep/bright), range \[-100, 100]. Values closer to -100 make the voice deeper; values closer to 100 make the voice brighter

      Value range: \[-100, 100]
    </ParamField>

    <ParamField body="timbre" type="integer">
      Timbre adjustment (magnetic/crisp), range \[-100, 100]. Values closer to -100 make the voice richer; values closer to 100 make the voice crisper

      Value range: \[-100, 100]
    </ParamField>

    <ParamField body="intensity" type="integer">
      Intensity adjustment (powerful/soft), range \[-100, 100]. Values closer to -100 make the voice stronger; values closer to 100 make the voice softer

      Value range: \[-100, 100]
    </ParamField>

    <ParamField body="sound_effects" type="string">
      Sound effect setting. Only one can be selected at a time. Available values:

      1. spacious\_echo (spacious echo)
      2. auditorium\_echo (auditorium broadcast)
      3. lofi\_telephone (telephone distortion)
      4. robotic (electronic voice)

      Available values: `spacious_echo`, `auditorium_echo`, `lofi_telephone`, `robotic`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="audio_setting" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="format" type="string" default="mp3">
      The format of the generated audio. Available range \[mp3, pcm, flac], default value is `mp3`

      Available values: `mp3`, `pcm`, `flac`
    </ParamField>

    <ParamField body="bitrate" type="integer" default={128000}>
      The bitrate of the generated audio. Available range \[32000, 64000, 128000, 256000], default value is `128000`. This parameter only takes effect for audio in `mp3` format
    </ParamField>

    <ParamField body="channel" type="integer" default={2}>
      The number of channels for the generated audio. Available range: \[1, 2], where `1` is mono and `2` is stereo. The default value is 1
    </ParamField>

    <ParamField body="audio_sample_rate" type="integer" default={32000}>
      The sample rate of the generated audio. Available range \[8000, 16000, 22050, 24000, 32000, 44100], default is `32000`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="voice_setting" type="object" required={true}>
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="vol" type="number" default={1}>
      The volume of the synthesized audio. The larger the value, the higher the volume. Value range (0, 10], default value is 1.0

      Value range: \[0, 10]
    </ParamField>

    <ParamField body="pitch" type="integer" default={0}>
      The pitch of the synthesized audio. Value range \[-12, 12], default value is 0, where 0 outputs the original voice

      Value range: \[-12, 12]
    </ParamField>

    <ParamField body="speed" type="number" default={1}>
      The speaking speed of the synthesized audio. The larger the value, the faster the speaking speed. Value range \[0.5, 2], default value is 1.0

      Value range: \[0.5, 2]
    </ParamField>

    <ParamField body="emotion" type="string">
      Controls the emotion of the synthesized speech. Parameter range \["happy", "sad", "angry", "fearful", "disgusted", "surprised", "calm", "fluent", "whisper"], corresponding to: happy, sad, angry, fearful, disgusted, surprised, neutral, vivid, whisper
      <br />• The model will automatically match an appropriate emotion based on the input text, so manual specification is generally not required
      <br />• This parameter only takes effect for the `speech-2.6-hd`, `speech-2.6-turbo`, `speech-01-hd`, `speech-01-turbo` models
      <br />• The options `fluent`, `whisper` only take effect for the `speech-2.6-turbo`, `speech-2.6-hd` models

      Available values: `happy`, `sad`, `angry`, `fearful`, `disgusted`, `surprised`, `calm`, `fluent`, `whisper`
    </ParamField>

    <ParamField body="voice_id" type="string" required={true}>
      The voice ID of the synthesized audio. If you need to set a mixed voice, please set the timber\_weights parameter and set this parameter to an empty value. Three types are supported: system voices, cloned voices, and text-generated voices. The following are some of the latest system voices (IDs). You can view all officially supported voices
      <br />• **Chinese**:<br />• moss\_audio\_ce44fc67-7ce3-11f0-8de5-96e35d26fb85<br />• moss\_audio\_aaa1346a-7ce7-11f0-8e61-2e6e3c7ee85d<br />• Chinese (Mandarin)\_Lyrical\_Voice<br />• Chinese (Mandarin)\_HK\_Flight\_Attendant<br />• **English**:<br />• English\_Graceful\_Lady<br />• English\_Insightful\_Speaker<br />• English\_radiant\_girl<br />• English\_Persuasive\_Man<br />• moss\_audio\_6dc281eb-713c-11f0-a447-9613c873494c<br />• moss\_audio\_570551b1-735c-11f0-b236-0adeeecad052<br />• moss\_audio\_ad5baf92-735f-11f0-8263-fe5a2fe98ec8<br />• English\_Lucky\_Robot<br />• **Japanese**:<br />• Japanese\_Whisper\_Belle<br />• moss\_audio\_24875c4a-7be4-11f0-9359-4e72c55db738<br />• moss\_audio\_7f4ee608-78ea-11f0-bb73-1e2a4cfcd245<br />• moss\_audio\_c1a6a3ac-7be6-11f0-8e8e-36b92fbb4f95
    </ParamField>

    <ParamField body="english_normalization" type="boolean" default={false}>
      Supports English text normalization. After it is enabled, performance in numeric reading scenarios can be improved, but latency will increase slightly. Default is false
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="aigc_watermark" type="boolean" default={false}>
  Controls whether to add an audio rhythm identifier at the end of the synthesized audio. The default value is False. This parameter only takes effect for non-streaming synthesis
</ParamField>

<ParamField body="language_boost" type="string">
  Whether to enhance recognition capability for specified low-resource languages and dialects. The default value is `null`. It can be set to `auto` to let the model determine automatically.

  Available values: `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`
</ParamField>

<ParamField body="continuous_sound" type="boolean" default={false}>
  Enable this parameter to make clause transitions more natural. Only the `speech-2.8-hd` and `speech-2.8-turbo` models are supported
</ParamField>

<ParamField body="pronunciation_dict" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="tone" type="string[]">
      Defines pronunciation or pronunciation replacement rules for text or symbols that require special annotation. In Chinese text, tones are represented by numbers:
      First tone is `1`, second tone is `2`, third tone is `3`, fourth tone is `4`, and neutral tone is `5`
      Example:
      \["燕少飞/(yan4)(shao3)(fei1)", "omg/oh my god"]
    </ParamField>
  </Expandable>
</ParamField>

## Response Information

<ResponseField name="file_id" type="integer" required={false}>
  The ID of the corresponding audio file returned after the task is created successfully.<br /><br />• After the task is completed, you can query using file\_id. This field is not returned when the request errors

  Note: The returned download URL is valid for 9 hours (32400 seconds) from the time it is generated. After expiration, the file will become invalid and the generated information will be lost. Please pay attention to the time limit for downloading the information
</ResponseField>

<ResponseField name="task_id" type="string" required={false}>
  Use task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>

<ResponseField name="base_resp" type="object" required={false}>
  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="status_msg" type="string" required={true}>
      Status details
    </ResponseField>

    <ResponseField name="status_code" type="integer" required={true}>
      Status code<br /><br />• `0`: Normal<br />• `1002`: Rate limited<br />• `1004`: Authentication failed<br />• `1039`: TPM rate limit triggered<br />• `1042`: Illegal characters exceed 10%<br />• `2013`: Parameter error
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="task_token" type="string" required={false}>
  Key information used to complete the current task
</ResponseField>

<ResponseField name="usage_characters" type="integer" required={false}>
  Number of billable characters
</ResponseField>
