Skip to main content

MiniMax Voice Cloning API reference

Supported models

Voice cloning requests generate demo audio. This audio is billed at the synchronous speech synthesis rate for the selected model.

Model name

Demo price (synchronous synthesis, per 10,000 characters)

Voice cloning(per request)

Free quota(note)

MiniMax/speech-2.8-hd

CNY 3.5

Synthesizing speech with a cloned voice for the first time incurs a one-time voice unlock fee of CNY 9.9.

None

MiniMax/speech-02-hd

CNY 3.5

MiniMax/speech-2.8-turbo

CNY 2.0

MiniMax/speech-02-turbo

CNY 2.0

Endpoint

  • Chinese mainland
In the Chinese Mainland Deployment Mode, the access point and data storage are in the Beijing region. Model inference is restricted to the Chinese Mainland.HTTP request endpoint: POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generationBase URL for SDK configuration: https://dashscope.aliyuncs.com/api/v1

Request headers

Parameter

Type

Required

Description

Authorization

string

Yes

Authentication token in the format Bearer <your_api_key>. Replace <your_api_key> with your API key.

Content-Type

string

Yes

Must be application/json; charset=utf-8.

Request body

modelstring(Required)Specifies the speech model to use for synthesizing the demo audio.inputobject(Required)

Properties

actionstring(Required)The action to perform. Set this to voice_clone.audio_urlstring(Required)The URL of the audio file for cloning. The audio must meet the following requirements:
  • Supported formats: MP3, M4A, or WAV.
  • Duration: 10 seconds to 5 minutes.
  • File size: Up to 20 MB.
clone_promptobject(Optional)An audio sample to enhance the similarity and stability of the synthesized voice.
prompt_audiostring(Optional)The URL of the sample audio file. The audio must meet the following requirements:
  • Supported formats: MP3, M4A, or WAV.
  • Duration: Less than 8 seconds.
  • File size: Up to 20 MB.
prompt_textstring(Optional)The transcript of the sample audio. Ensure it matches the audio content exactly and ends with a punctuation mark.
textstring(Required)The text to be synthesized into the demo audio using the cloned voice. The text cannot exceed 1,000 characters.
The demo audio is billed based on the number of characters, according to the MiniMax model pricing.
  • Tone tags: Only supported when using the speech-2.8-hd or speech-2.8-turbo models. You can insert the following tone tags in the text: (laughs) (laughter), (chuckle) (chuckle), (coughs) (cough), (clear-throat) (clears throat), (groans) (groan), (breath) (breath), (pant) (pant), (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) (crying), and (applause) (applause).
voice_id string(Required)A unique identifier for the cloned voice. Example: "MiniMax001". When defining a custom voice_id, follow these rules:
  • Must be between 8 and 256 characters long.
  • Must start with a letter.
  • Can contain letters, numbers, hyphens (-), and underscores (_).
  • Cannot end with a hyphen or underscore.
  • The voice_id must be unique. An error will occur if the ID already exists.
This parameter is globally unique. We recommend including a timestamp or other unique information in the ID.
language_boostenum<string>(Optional) Default: nullEnhances the recognition of specific low-resource languages and dialects. Set to auto to let the model decide.
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
need_noise_reductionboolean (Optional) Default: falseSpecifies whether to enable noise reduction for the audio cloning process.need_volume_normalizationboolean (Optional) Default: falseSpecifies whether to enable volume normalization.aigc_watermarkboolean (Optional) Default: falseSpecifies whether to add an audio rhythm marker at the end of the synthesized demo audio.
  • Voice cloning
curl -X POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
  -H "Authorization: Bearer ${DASH_APIKEY}" \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "input": {
      "action": "voice_clone",
      "voice_id": "bailian-test-voice-22",
      "audio_url": "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/cosyvoice/cosyvoice-zeroshot-sample.wav",
      "text": "What you say goes."
    },
    "model": "MiniMax/speech-2.8-turbo"
  }'

Response body

request_idstringThe unique identifier for this request.outputobject

Properties

​input_sensitivebooleanIndicates whether the input audio triggered risk control.​input_sensitive_typeintegerThe type of risk control triggered by the input audio. Possible values include:
  • 0: Normal
  • 1: Severe Violation
    1. Pornography
  • 3: Advertisement
  • 4: Prohibited
  • 5: Abuse
  • 6: Violent Terrorism
  • 7: Others
​demo_audiostringThe URL of the generated demo audio.base_respobject
status_codeintegerThe status code of the request.
  • 0: Request successful
  • 1000: Unknown error
  • 1001: Timeout
  • 1002: Request throttled
  • 1004: Authentication failed
  • 1013: Internal server error
  • 2013: Invalid input format
  • 2038: You do not have permission for Voice Cloning. Check your account's verification status.
For more details, see the Error Code List.status_msgstringA detailed message describing the status.
usageobjectThe character usage for this request.

Properties

characters integerThe number of characters in the input text.
  • Voice cloning
{
    "output": {
        "base_resp": {
            "status_code": 0,
            "status_msg": "success"
        },
        "demo_audio": "https://minimax-algeng-chat-tts.oss-cn-wulanchabu.aliyuncs.com/audio%2Feffect%2F05fdf023562aea84632d2a8c01c2366f_1773059375796_1311.mp3?Expires=1773232175&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE",
        "input_sensitive": false,
        "input_sensitive_type": 0
    },
    "usage": {
        "characters": 18
    },
    "request_id": "b1160386-ebf1-913f-9275-ef176c5e1c91"
}
Token Plan
Model Playground
Fine-tuning
Model Compression
Statistics and Monitoring
Support