Clone a voice using uploaded audio samples
December 27, 2024 (August 24, 2026)
Table of contents
Builds a new voice from audio samples uploaded with POST speech/upload-sample. The voice it returns can be passed as voice_id to any of the speech endpoints.
Cloned voices occupy a slot, and how many an account gets depends on its MiniMax plan. GET speech/equity reports used and total, and POST speech/delete-voice frees one. Treat the count as advisory rather than as a gate — MiniMax lets used exceed total, and the authoritative refusal is error 2600010 on the clone itself. If you need more slots than a plan allows, configure another www.minimax.io/audio account.
Please be patient, voice cloning can take up to 60 seconds. This endpoint can only support one or two parallel tasks maximum, so organize internal queuing if you need to clone many voices in bulk.
https://api.useapi.net/v1/minimax/speech/clone-voice
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"files": "user:user_id-minimax:account-file:file_id1,user:user_id-minimax:account-file:file_id2",
"voice_name": "Doctor Who",
"language_tag": "English"
}
-
voice_nameis required.
Maximum length: 30 characters. -
language_tagis required. Use tag_name from arrayvoice_tag_languageof GET speech/config. -
filesis required. Provide up to 10 comma-separatedfileIDvalues of audio samples uploaded via POST speech/upload-sample. Each audio sample should be between 10 to 60 seconds long. -
need_noise_reductionis optional.
Supported values:true(default),false.
Responses
-
{ "voice_id": "user:user_id-minimax:account_id-voice:voice_id", "parent_voice_id": "0", "voice_name": "Doctor Who", "tag_list": [ "English" ], "file_id": "1234567890", "cover_url": "https://cdn.hailuoai.video/...png", "create_time": 1122334455667, "update_time": 1122334455667, "collected": false, "voice_status": 2, "sample_audio": "https://cdn.hailuoai.video/...mp3", "uniq_id": "<uniq_id>", "group_id": "<group_id>" } -
{ "error": "<Error message>" } -
{ "error": "Unauthorized" } -
596 Account Error
{ "error": "Your minimax account has pending error. Please address this issue at https://useapi.net/docs/api-minimax-v1/post-minimax-accounts-account before making any new API calls.", "code": 596 }
Model
{ // TypeScript, all fields are optional
voice_id: string
parent_voice_id: string
voice_name: string
tag_list: string[]
file_id: string
cover_url: string
create_time: number
update_time: number
collected: boolean
voice_status: number
sample_audio: string
uniq_id: string
group_id: string
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST https://api.useapi.net/v1/minimax/speech/clone-voice \ -d '{"voice_name": "…", "language_tag": "…", "files": …}' -
const voice_name = "Voice Name"; const language_tag = "Voice Language"; const files = "fileID1,fileID2"; const apiUrl = `https://api.useapi.net/v1/minimax/speech/clone-voice`; const api_token = "API token"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ voice_name, language_tag, files }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); -
import requests voice_name = "Voice Name" language_tag = "Voice Language" files = "fileID1,fileID2" apiUrl = f"https://api.useapi.net/v1/minimax/speech/clone-voice" api_token = "API token" maxJobs = 1 headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } body = { "voice_name": f"{voice_name}", "language_tag": f"{language_tag}", "files": files } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json())