> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-docs-runpod-allow-ip.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If this page is missing information, contains outdated instructions, or doesn't fully answer the user's question, use the feedback tool to report it. In your feedback, be specific about what's missing, what appears out of date, or what needs to be corrected or updated, so the docs team can act on it directly.

# Minimax Speech 02 HD

> High-definition text-to-speech with emotional control and voice customization. See model inputs and outputs on Runpod Public Endpoints.

Minimax Speech 02 HD is a high-definition text-to-speech model with emotional control and voice customization. It produces natural-sounding speech with adjustable speed, pitch, volume, and emotional tone.

<Card title="Try in playground" icon="play" href="https://console.runpod.io/hub/playground/audio/minimax-speech-02-hd" horizontal>
  Test Minimax Speech 02 HD in the Runpod Hub playground.
</Card>

|              |                                                         |
| ------------ | ------------------------------------------------------- |
| **Endpoint** | `https://api.runpod.ai/v2/minimax-speech-02-hd/runsync` |
| **Pricing**  | \$0.05 per 1000 characters                              |
| **Type**     | Text-to-speech                                          |

## Request

All parameters are passed within the `input` object in the request body.

<ParamField body="input.prompt" type="string" required>
  Text to convert to speech.
</ParamField>

<ParamField body="input.voice_id" type="string" default="Wise_Woman">
  Voice identifier for the desired voice.
</ParamField>

<ParamField body="input.speed" type="number" default="1">
  Speech speed multiplier.
</ParamField>

<ParamField body="input.volume" type="number" default="1">
  Volume level.
</ParamField>

<ParamField body="input.pitch" type="number" default="0">
  Pitch adjustment.
</ParamField>

<ParamField body="input.emotion" type="string" default="neutral">
  Emotion to convey. Options include `happy`, `sad`, `neutral`, `angry`, `fearful`, `surprised`.
</ParamField>

<ParamField body="input.english_normalization" type="boolean" default="false">
  Enable English text normalization for better pronunciation of numbers, abbreviations, etc.
</ParamField>

<ParamField body="input.default_audio_url" type="string">
  Fallback audio URL if generation fails.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.runpod.ai/v2/minimax-speech-02-hd/runsync" \
    -H "Authorization: Bearer $RUNPOD_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "input": {
        "prompt": "Welcome to our advanced text-to-speech system. This is a demonstration of natural speech synthesis.",
        "voice_id": "Wise_Woman",
        "speed": 1,
        "volume": 1,
        "pitch": 0,
        "emotion": "happy",
        "english_normalization": false
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.runpod.ai/v2/minimax-speech-02-hd/runsync",
      headers={
          "Authorization": f"Bearer {RUNPOD_API_KEY}",
          "Content-Type": "application/json",
      },
      json={
          "input": {
              "prompt": "Welcome to our advanced text-to-speech system. This is a demonstration of natural speech synthesis.",
              "voice_id": "Wise_Woman",
              "speed": 1,
              "volume": 1,
              "pitch": 0,
              "emotion": "happy",
              "english_normalization": False,
          }
      },
  )

  result = response.json()
  print(result["output"]["audio_url"])
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.runpod.ai/v2/minimax-speech-02-hd/runsync",
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${RUNPOD_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        input: {
          prompt: "Welcome to our advanced text-to-speech system. This is a demonstration of natural speech synthesis.",
          voice_id: "Wise_Woman",
          speed: 1,
          volume: 1,
          pitch: 0,
          emotion: "happy",
          english_normalization: false,
        },
      }),
    }
  );

  const result = await response.json();
  console.log(result.output.audio_url);
  ```
</RequestExample>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the request.
</ResponseField>

<ResponseField name="status" type="string">
  Request status. Returns `COMPLETED` on success, `FAILED` on error.
</ResponseField>

<ResponseField name="delayTime" type="integer">
  Time in milliseconds the request spent in queue before processing began.
</ResponseField>

<ResponseField name="executionTime" type="integer">
  Time in milliseconds the model took to generate the audio.
</ResponseField>

<ResponseField name="workerId" type="string">
  Identifier of the worker that processed the request.
</ResponseField>

<ResponseField name="output" type="object">
  The generation result containing the audio URL and cost.

  <ResponseField name="output.audio_url" type="string">
    URL of the generated audio file. This URL expires after 7 days.
  </ResponseField>

  <ResponseField name="output.cost" type="float">
    Cost of the generation in USD.
  </ResponseField>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "sync-a1b2c3d4-e5f6-7890-abcd-ef1234567890-u1",
    "status": "COMPLETED",
    "delayTime": 14,
    "executionTime": 3456,
    "workerId": "oqk7ao1uomckye",
    "output": {
      "audio_url": "https://audio.runpod.ai/abc123/output.mp3",
      "cost": 0.0055
    }
  }
  ```

  ```json 400 theme={null}
  {
    "id": "sync-a1b2c3d4-e5f6-7890-abcd-ef1234567890-u1",
    "status": "FAILED",
    "error": "Invalid voice_id"
  }
  ```
</ResponseExample>

<Warning>
  Audio URLs expire after 7 days. Download and store generated audio files immediately if you need to keep them.
</Warning>

## Cost calculation

Minimax Speech 02 HD charges \$0.05 per 1000 characters. Example costs:

| Characters        | Cost    |
| ----------------- | ------- |
| 500 characters    | \$0.025 |
| 1,000 characters  | \$0.05  |
| 10,000 characters | \$0.50  |
