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

# Synchronous TTS HTTP



## OpenAPI

````yaml api-reference/en/zmodelAudio/minimax/audio-generation/t2a-v2.json POST /minimax/v1/t2a_v2
openapi: 3.0.1
info:
  title: MiniMax T2A API
  description: Use this API for synchronous text-to-speech synthesis over HTTP.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.powertokens.ai
security:
  - bearerAuth: []
paths:
  /minimax/v1/t2a_v2:
    post:
      tags:
        - Text to Audio
      summary: Text to Audio V2
      operationId: t2aV2
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: >-
            Media type of the request body. Set to `application/json` to ensure
            the request data is in JSON format.
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/T2aV2Req'
            examples:
              Non-streaming:
                value:
                  model: speech-2.8-hd
                  text: Today is such a happy day (laughs), of course!
                  stream: false
                  voice_setting:
                    voice_id: male-qn-qingse
                    speed: 1
                    vol: 1
                    pitch: 0
                    emotion: happy
                  pronunciation_dict:
                    tone:
                      - 处理/(chu3)(li3)
                      - 危险/dangerous
                  audio_setting:
                    sample_rate: 32000
                    bitrate: 128000
                    format: mp3
                    channel: 1
                  subtitle_enable: false
              Streaming:
                value:
                  model: speech-2.8-hd
                  text: Today is such a happy day (laughs), of course!
                  stream: true
                  voice_setting:
                    voice_id: male-qn-qingse
                    speed: 1
                    vol: 1
                    pitch: 0
                    emotion: happy
                  pronunciation_dict:
                    tone:
                      - 处理/(chu3)(li3)
                      - 危险/dangerous
                  audio_setting:
                    sample_rate: 32000
                    bitrate: 128000
                    format: mp3
                    channel: 1
                  subtitle_enable: false
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/T2aV2Resp'
              examples:
                Non-streaming:
                  value:
                    data:
                      audio: <hex-encoded audio>
                      status: 2
                    extra_info:
                      audio_length: 9900
                      audio_sample_rate: 32000
                      audio_size: 160323
                      bitrate: 128000
                      word_count: 52
                      invisible_character_ratio: 0
                      usage_characters: 26
                      audio_format: mp3
                      audio_channel: 1
                    trace_id: 01b8bf9bb7433cc75c18eee6cfa8fe21
                    base_resp:
                      status_code: 0
                      status_msg: success
                Streaming:
                  value:
                    - data:
                        audio: hex-encoded audio_chunk1
                        status: 1
                      trace_id: 01b8bf9bb7433cc75c18eee6cfa8fe21
                      base_resp:
                        status_code: 0
                        status_msg: ''
                    - data:
                        audio: hex-encoded audio_chunk2
                        status: 1
                      trace_id: 01b8bf9bb7433cc75c18eee6cfa8fe21
                      base_resp:
                        status_code: 0
                        status_msg: ''
                    - data:
                        audio: hex-encoded audio
                        status: 2
                      extra_info:
                        audio_length: 6931
                        audio_sample_rate: 32000
                        audio_size: 111789
                        bitrate: 128000
                        word_count: 112
                        invisible_character_ratio: 0
                        usage_characters: 112
                        audio_format: mp3
                        audio_channel: 1
                      trace_id: 04ece790375f3ca2edbb44e8c4c200bf
                      base_resp:
                        status_code: 0
                        status_msg: success
            text/event-stream:
              schema:
                $ref: '#/components/schemas/T2aV2Resp'
              examples:
                Streaming:
                  value:
                    - data:
                        audio: hex-encoded audio_chunk1
                        status: 1
                      trace_id: 01b8bf9bb7433cc75c18eee6cfa8fe21
                      base_resp:
                        status_code: 0
                        status_msg: ''
                    - data:
                        audio: hex-encoded audio_chunk2
                        status: 1
                      trace_id: 01b8bf9bb7433cc75c18eee6cfa8fe21
                      base_resp:
                        status_code: 0
                        status_msg: ''
                    - data:
                        audio: hex-encoded audio
                        status: 2
                      extra_info:
                        audio_length: 6931
                        audio_sample_rate: 32000
                        audio_size: 111789
                        bitrate: 128000
                        word_count: 112
                        invisible_character_ratio: 0
                        usage_characters: 112
                        audio_format: mp3
                        audio_channel: 1
                      trace_id: 04ece790375f3ca2edbb44e8c4c200bf
                      base_resp:
                        status_code: 0
                        status_msg: success
components:
  schemas:
    T2aV2Req:
      type: object
      required:
        - model
        - text
      properties:
        model:
          type: string
          description: >-
            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`.
          enum:
            - speech-2.8-hd
            - speech-2.8-turbo
            - speech-2.6-hd
            - speech-2.6-turbo
            - speech-02-hd
            - speech-02-turbo
        text:
          type: string
          description: >-
            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:
          type: boolean
          description: >-
            Controls whether to use streaming output. Defaults to false
            (non-streaming).
        stream_options:
          $ref: '#/components/schemas/T2AStreamOption'
        voice_setting:
          $ref: '#/components/schemas/T2AVoiceSetting'
        audio_setting:
          $ref: '#/components/schemas/T2AAudioSetting'
        pronunciation_dict:
          $ref: '#/components/schemas/PronunciationDict'
        timbre_weights:
          type: array
          items:
            $ref: '#/components/schemas/TimbreWeights'
        language_boost:
          type: string
          description: >-
            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.
          enum:
            - 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
          default: null
        voice_modify:
          $ref: '#/components/schemas/VoiceModify'
        subtitle_enable:
          type: boolean
          description: >-
            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.
          default: false
        subtitle_type:
          type: string
          description: >-
            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`.
          enum:
            - sentence
            - word
            - word_streaming
          default: sentence
        output_format:
          type: string
          description: >-
            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.
          enum:
            - url
            - hex
          default: hex
        aigc_watermark:
          type: boolean
          description: >-
            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.
          default: false
    T2aV2Resp:
      type: object
      properties:
        data:
          type: object
          description: >-
            Synthesized audio data object. May be null, so null-checking is
            required.
          properties:
            audio:
              type: string
              description: >-
                Synthesized audio data in hex encoding, matching the output
                format specified in the request.
            subtitle_file:
              type: string
              description: >-
                Download link for the synthesized subtitle file. The subtitle
                file corresponding to the audio, accurate to sentence level (up
                to 50 characters), in milliseconds, in JSON format.
            status:
              type: integer
              description: >-
                Current audio stream status: 1 indicates synthesizing, 2
                indicates synthesis complete.
        trace_id:
          type: string
          description: >-
            Session ID for this request, used to help locate issues when
            consulting or providing feedback.
        extra_info:
          type: object
          description: Additional audio information.
          properties:
            audio_length:
              type: integer
              format: int64
              description: Audio duration in milliseconds.
            audio_sample_rate:
              type: integer
              format: int64
              description: Audio sample rate.
            audio_size:
              type: integer
              format: int64
              description: Audio file size in bytes.
            bitrate:
              type: integer
              format: int64
              description: Audio bitrate.
            audio_format:
              type: string
              description: >-
                Format of the generated audio file. Available values: `[mp3,
                pcm, flac]`.
              enum:
                - mp3
                - pcm
                - flac
            audio_channel:
              type: integer
              format: int64
              description: 'Number of audio channels. 1: mono, 2: stereo.'
            invisible_character_ratio:
              type: number
              format: double
              description: >-
                Ratio of invalid characters. If invalid characters do not exceed
                10% (inclusive), audio will be generated normally and the
                invalid character ratio data will be returned; if it exceeds
                10%, an error will be reported.
            usage_characters:
              type: integer
              format: int64
              description: Number of billable characters.
            word_count:
              type: integer
              format: int64
              description: >-
                Count of pronounced characters, including Chinese characters,
                digits, and letters, excluding punctuation marks.
        base_resp:
          type: object
          description: Status code and details for this request.
          properties:
            status_code:
              type: integer
              format: int64
              description: >+
                Status codes:


                You can retrieve the trace_id from the response header to help
                locate issues when consulting or providing feedback.


                - `0`: Request successful

                - `1000`: Unknown error

                - `1001`: Timeout

                - `1002`: Rate limit triggered

                - `1004`: Authentication failed

                - `1039`: TPM rate limit triggered

                - `1042`: Invalid characters exceed 10%

                - `2013`: Abnormal input parameters

            status_msg:
              type: string
              description: Status details.
    T2AStreamOption:
      type: object
      properties:
        exclude_aggregated_audio:
          type: boolean
          description: >-
            Sets whether the last chunk contains the concatenated full audio hex
            data. Defaults to false, meaning the last chunk includes the
            concatenated complete audio hex data.
    T2AVoiceSetting:
      type: object
      required:
        - voice_id
      properties:
        voice_id:
          type: string
          description: "Voice ID for the synthesized audio. If you need to set mixed voices, use the `timbre_weights` parameter and set this parameter to empty. Supports system voices, cloned voices, and text-to-voice types. Below are some of the latest system voices (ID):\n\n - **Chinese**:\n\t- moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85\n\t- moss_audio_aaa1346a-7ce7-11f0-8e61-2e6e3c7ee85d\n\t- Chinese (Mandarin)_Lyrical_Voice\n\t- Chinese (Mandarin)_HK_Flight_Attendant\n- **English**:\n\t- English_Graceful_Lady\n\t- English_Insightful_Speaker\n\t- English_radiant_girl\n\t- English_Persuasive_Man\n\t- moss_audio_6dc281eb-713c-11f0-a447-9613c873494c\n\t- moss_audio_570551b1-735c-11f0-b236-0adeeecad052\n\t- moss_audio_ad5baf92-735f-11f0-8263-fe5a2fe98ec8\n\t- English_Lucky_Robot\n- **Japanese**:\n\t- Japanese_Whisper_Belle\n\t- moss_audio_24875c4a-7be4-11f0-9359-4e72c55db738\n\t- moss_audio_7f4ee608-78ea-11f0-bb73-1e2a4cfcd245\n\t- moss_audio_c1a6a3ac-7be6-11f0-8e8e-36b92fbb4f95\n- **Cantonese** (requires `language_boost` set to `Chinese,Yue`):\n\t- Cantonese_GentleLady\n\t- Cantonese_podacast_host_1"
        speed:
          type: number
          format: float
          description: >-
            Speech speed of the synthesized audio. Higher values result in
            faster speech. Value range `[0.5, 2]`. Defaults to 1.0.
          minimum: 0.5
          maximum: 2
          default: 1
        vol:
          type: number
          format: float
          description: >-
            Volume of the synthesized audio. Higher values result in louder
            audio. Value range `(0, 10]`. Defaults to 1.0.
          minimum: 0
          exclusiveMinimum: true
          maximum: 10
          default: 1
        pitch:
          type: integer
          description: >-
            Pitch of the synthesized audio. Value range `[-12, 12]`. Defaults to
            0, which outputs the original voice pitch.
          minimum: -12
          maximum: 12
          default: 0
        emotion:
          type: string
          description: "Controls the emotion of the synthesized speech. Parameter range: `[\"happy\", \"sad\", \"angry\", \"fearful\", \"disgusted\", \"surprised\", \"calm\", \"fluent\", \"whisper\"]`, corresponding to 9 emotions: happy, sad, angry, fearful, disgusted, surprised, calm, vivid, whisper.\r\n- The model automatically matches the appropriate emotion based on the input text; manual specification is generally not needed.\r\n- This parameter only takes effect for `speech-2.8-hd`, `speech-2.8-turbo`, `speech-2.6-hd`, `speech-2.6-turbo`, `speech-02-hd`, `speech-02-turbo` models.\r\n- Options `fluent` and `whisper` only take effect for `speech-2.6-turbo` and `speech-2.6-hd` models. `speech-2.8-hd` and `speech-2.8-turbo` models do not support `whisper`."
          enum:
            - happy
            - sad
            - angry
            - fearful
            - disgusted
            - surprised
            - calm
            - fluent
            - whisper
        text_normalization:
          type: boolean
          description: >-
            Whether to enable Chinese and English text normalization. When
            enabled, it improves performance in numeric reading scenarios but
            slightly increases latency. Defaults to false.
          default: false
        latex_read:
          type: boolean
          description: >-
            Controls whether to read LaTeX formulas aloud. Defaults to false.


            **Note**:


            - Only supports Chinese. When this parameter is enabled,
            `language_boost` will be set to `Chinese`.


            - Formulas in the request must be wrapped with `$$` at the beginning
            and end.


            - If a formula in the request contains `"\"`, it must be escaped as
            `"\\"`.



            Example: The basic quadratic formula


            ![The quadratic

            formula](https://filecdn.minimax.chat/public/d6f62e9a-cd3f-4f55-a237-257eef531683.png)



            Should be represented as `$$x = \\frac{-b \\pm \\sqrt{b^2 -
            4ac}}{2a}$$`.
          default: false
    T2AAudioSetting:
      type: object
      properties:
        sample_rate:
          type: integer
          format: int64
          description: >-
            Sample rate of the generated audio. Available values: `[8000, 16000,
            22050, 24000, 32000, 44100]`. Defaults to `32000`.
        bitrate:
          type: integer
          format: int64
          description: >-
            Bitrate of the generated audio. Available values: `[32000, 64000,
            128000, 256000]`. Defaults to `128000`. This parameter only takes
            effect for `mp3` format audio.
        format:
          type: string
          description: >-
            Format of the generated audio. `pcmu_raw` and `pcmu_wav` are G.711
            μ-law encoding (sample rate 8 kHz; `pcmu_raw` is raw data without
            header, `pcmu_wav` is wrapped in a WAV container). `opus` is
            Ogg/Opus encoding.
          enum:
            - mp3
            - pcm
            - flac
            - wav
            - pcmu_raw
            - pcmu_wav
            - opus
          default: mp3
        channel:
          type: integer
          format: int64
          description: >-
            Number of audio channels. Available values: `[1, 2]`, where `1` is
            mono and `2` is stereo. Defaults to 1.
        force_cbr:
          type: boolean
          description: >-
            Constant bitrate (CBR) control for audio. Available values: `false`,
            `true`. When set to `true`, audio encoding will use constant bitrate
            mode.

            Note: This parameter only takes effect when audio is set to
            **streaming** output and the audio format is `mp3`.
          default: false
    PronunciationDict:
      type: object
      properties:
        tone:
          type: array
          description: >-
            Defines custom pronunciation rules in the format
            `original/replacement`. The replacement can be plain text,
            parenthesized Pinyin (with tone numbers), parenthesized IPA symbols,
            or Japanese kana (hiragana, katakana, romaji — can be mixed).
            Multiple rules take effect simultaneously.



            Example:


            ```json dark


            "pronunciation_dict": {
              "tone": [
                "resume/(rɪˈzjuːm)",
                "read/(riːd)",
                "处理/(chu3)(li3)",
                "郑栅洁/(zheng4)(shan1)杰",
                "20日/はつか",
                "4桁/よんけた",
                "東京/トウキョウ",
                "omg/oh my god",
                "の/no"
              ]
            }


            ```



            This example demonstrates: IPA transcription for English polyphones,
            Pinyin + tone numbers for Chinese, mixed Pinyin and Chinese
            characters, Japanese kana for counters and kanji readings,
            text-to-text expansion, and symbol replacement.



            Chinese tones: `1` = first tone, `2` = second tone, `3` = third
            tone, `4` = fourth tone, `5` = neutral tone.
          items:
            type: string
    TimbreWeights:
      type: object
      required:
        - voice_id
        - weight
      properties:
        voice_id:
          type: string
          description: >-
            Voice ID for the synthesized audio. Must be filled together with the
            `weight` parameter. Supports system voices, cloned voices, and
            text-to-voice types.
        weight:
          type: integer
          format: int64
          description: >-
            Weight of each voice in the synthesized audio. Must be filled
            together with `voice_id`. Value range [1, 100]. Supports up to 4
            voice mixtures. The higher the proportion of a single voice, the
            closer the synthesized voice resembles that voice.



            ```json dark


            "timbre_weights": [
              {
                "voice_id": "female-chengshu",
                "weight": 30
              },
              {
                "voice_id": "female-tianmei",
                "weight": 70
              }
            ]


            ```
          minimum: 1
          maximum: 100
    VoiceModify:
      type: object
      description: |-
        Voice effect settings. Supported audio formats:
        - Non-streaming: `mp3`, `wav`, `flac`
        - Streaming: `mp3`
      properties:
        pitch:
          type: integer
          description: >-
            Pitch adjustment (deeper/brighter). Range [-100, 100]. Values closer
            to -100 make the voice deeper; closer to 100 make it brighter.



            ![pitch

            adjustment](https://filecdn.minimax.chat/public/5d210c47-4236-4e81-893b-16cc1ef0302d.png)
          minimum: -100
          maximum: 100
        intensity:
          type: integer
          description: >-
            Intensity adjustment (powerful/soft). Range [-100, 100]. Values
            closer to -100 make the voice more powerful; closer to 100 make it
            softer.



            ![intensity

            adjustment](https://filecdn.minimax.chat/public/862d493e-71d5-4d1f-b7c3-9ac51890631b.png)
          minimum: -100
          maximum: 100
        timbre:
          type: integer
          description: >-
            Timbre adjustment (magnetic/crisp). Range [-100, 100]. Values closer
            to -100 make the voice fuller; closer to 100 make it crisper.



            ![timbre

            adjustment](https://filecdn.minimax.chat/public/5f0e6cae-363a-452b-8d42-fbc4ef5a0510.png)
          minimum: -100
          maximum: 100
        sound_effects:
          type: string
          description: >-
            Sound effect setting. Only one can be selected at a time. Available
            values:

            1. spacious_echo

            2. auditorium_echo

            3. lofi_telephone

            4. robotic
          enum:
            - spacious_echo
            - auditorium_echo
            - lofi_telephone
            - robotic
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````