Skip to content

MiniMax Voice Cloning

MiniMax Voice Cloning creates a cloned voice from a publicly accessible audio file. After the endpoint returns voice_id, pass that value as the voice field when calling /v1/audio/speech with MiniMax Speech 2.8.

Endpoint

http
POST /v1/audio/voice-cloning

Model

ModelDescription
minimax-voice-cloningMiniMax quick voice cloning

Request Parameters

ParameterTypeRequiredDescription
modelstringYesUse minimax-voice-cloning
audio_urlstringYesPublicly accessible source audio URL
textstringNoPreview text. When provided, the response usually includes a preview audio URL
preview_modelstringConditionalRequired when text is provided. Use speech-2.8-hd or speech-2.8-turbo
accuracynumberNoSimilarity requirement, commonly 0.7
need_noise_reductionbooleanNoWhether to enable noise reduction
need_volume_normalizationbooleanNoWhether to enable volume normalization
clone_promptobjectNoPrompt audio and matching text for better stability

clone_prompt fields:

ParameterTypeRequiredDescription
prompt_audio_urlstringYesPrompt audio URL, recommended to be shorter than 8 seconds
prompt_textstringYesText matching the prompt audio, preferably ending with punctuation

Audio Requirements

ItemDescription
Formatmp3, m4a, wav
DurationAt least 10 seconds and no more than 5 minutes
File sizeNo more than 20 MB
ContentA clear single-speaker recording with low background noise is recommended

Create A Voice

bash
curl -X POST "https://cubicspaces.cloud/v1/audio/voice-cloning" \
  -H "Authorization: Bearer $NEW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-voice-cloning",
    "audio_url": "https://example.com/voice.mp3",
    "text": "This text is used to preview the cloned voice.",
    "preview_model": "speech-2.8-hd",
    "accuracy": 0.7,
    "need_noise_reduction": true,
    "need_volume_normalization": true
  }'

Response Example

json
{
  "demo_audio_url": "https://example.com/demo.mp3",
  "voice_id": "voice_abc123"
}

Use The Cloned Voice

bash
curl -X POST "https://cubicspaces.cloud/v1/audio/speech" \
  -H "Authorization: Bearer $NEW_API_KEY" \
  -H "Content-Type: application/json" \
  --output cloned-voice.mp3 \
  -d '{
    "model": "minimax-speech-2.8-hd",
    "voice": "voice_abc123",
    "input": "This is an example generated with a cloned voice.",
    "response_format": "mp3",
    "speed": 1
  }'

Fast-cloned voices may be temporary. After creating one, call that voice_id through /v1/audio/speech as soon as possible to confirm that it is available.