Skip to content

Upload clone audio

Cloning flow step 1: upload a recording or example clip to get a single-use `file_id`; free.

POST/v1/files/upload

Submitted as multipart/form-data with only the purpose and file fields; any other field returns 400. voice_clone is the recording to clone, and prompt_audio is an optional example clip. Format and size are checked at upload; duration (voice_clone 10 seconds to 5 minutes, prompt_audio under 8 seconds) is checked when you clone.

Files are single-use: a successful clone automatically deletes both the source audio and the example audio; a failed clone keeps them so you can retry with other parameters. Files not used within 24 hours of upload are deleted automatically. Uploaded audio cannot be downloaded. The key's group must include the MiniMax Speech models.

Clone only your own voice, or one whose speaker has given you explicit written permission.

Headers

Authorization:requiredstring

Bearer sk-…: an API key created in the console under API keys; its group must include the requested model

Body parametersmultipart

purpose:requiredstring

voice_clone for the recording to clone, prompt_audio for an example clip

Valuesvoice_cloneprompt_audio

file:requiredbinary

One file with extension .mp3 / .m4a / .wav, ≤20 MB

Returns

200Uploaded

file:optionalobject

Uploaded file

base_resp:optionalobject

{"status_code": 0, "status_msg": "success"} on success; errors do not come here but as a non-200 status code with an error object

Errors

400Invalid purpose, empty file, unsupported format, or an extra file or field
401Missing, invalid or expired API key (missing_api_key / invalid_api_key / api_key_expired)
404The model is not in this key's group (model_not_found), or the path does not belong to the group (route_not_found)
413Request body too large: file exceeds the 20 MiB limit

Related