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

# MiniMax Quick Voice Cloning

This API supports single and dual-channel voice cloning, allowing you to quickly clone a voice with the same timbre based on a specified audio file.
The cloned voice produced by this API is a temporary voice. If you wish to permanently retain a cloned voice, please use it in any T2A text-to-speech API within 168 hours (7 days) (excluding preview playback within this API); otherwise, the voice will be deleted.

This API is suitable for scenarios such as: IP voice replication, voice cloning, and other scenarios that require quick voice cloning.

Notes:

* Uploaded audio files must be in mp3, m4a, or wav format;
* Uploaded audio files must be at least 10 seconds and no longer than 5 minutes;
* Uploaded audio files must not exceed 20 MB in size.

## Request Headers

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

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

## Request Body

<ParamField body="audio_url" type="string" required={true}>
  URL of the audio file to clone the voice from. Supports mp3, m4a, and wav formats.
</ParamField>

<ParamField body="clone_prompt">
  Voice cloning parameters. Providing this parameter will help enhance timbre similarity and stability in speech synthesis.

  When using this parameter, you must also upload a short sample audio clip (duration less than 8 seconds) along with the corresponding text. Audio formats supported: mp3, m4a, wav.

  <Expandable title="properties">
    <ParamField body="prompt_audio_url" type="number" required={true}>
      Audio prompt parameter: URL of the sample audio, duration must be less than 8 seconds.
    </ParamField>

    <ParamField body="prompt_text" type="string" required={true}>
      Audio prompt parameter: the text corresponding to the sample audio. Must match the audio content exactly, and must end with punctuation.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="text" type="string">
  Preview parameter. The model will use the cloned voice to read this text aloud and return the synthesized audio as a URL for previewing the cloning result. Limited to 2000 characters. Note: preview will incur normal speech synthesis charges based on character count, priced the same as each T2A API.
</ParamField>

<ParamField body="model" type="string">
  Preview parameter. Specifies the speech model used for the preview. This field is required when the "text" field is provided.<br />
  Possible values: `speech-02-hd`, `speech-02-turbo`, `speech-2.5-hd-preview`, `speech-2.5-turbo-preview`
</ParamField>

<ParamField body="accuracy" type="float">
  Voice cloning parameter. Range \[0, 1]. Setting this field configures the text verification accuracy threshold. Default: 0.7.
</ParamField>

<ParamField body="need_noise_reduction" type="bool">
  Voice cloning parameter. Whether to enable noise reduction. Default: false.
</ParamField>

<ParamField body="need_volume_normalization" type="bool">
  Voice cloning parameter. Whether to enable volume normalization. Default: false.
</ParamField>

## Response

<ResponseField name="demo_audio_url" type="string">
  If the request body includes the preview text and preview model, this parameter returns the preview audio as a URL.
</ResponseField>

<ResponseField name="voice_id" type="string">
  The generated voice\_id.
</ResponseField>
