Upload File
curl --request POST \
--url https://api.minimax.io/v1/files/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form purpose=prompt_audio \
--form file='@example-file'{
"file": {
"file_id": "${file_id}",
"bytes": 5896337,
"created_at": 1700469398,
"filename": "sample.mp3",
"purpose": "prompt_audio"
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Voice Cloning
Upload Prompt Auido
Use this API to upload prompt audio file. Providing this file helps to enhance the voice similarity and stability of the Text-to-Speech output.
POST
/
v1
/
files
/
upload
Upload File
curl --request POST \
--url https://api.minimax.io/v1/files/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form purpose=prompt_audio \
--form file='@example-file'{
"file": {
"file_id": "${file_id}",
"bytes": 5896337,
"created_at": 1700469398,
"filename": "sample.mp3",
"purpose": "prompt_audio"
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Authorizations
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme:
Bearer API_key, can be found in Account Management>API Keys.
Headers
Indicates the request is a multipart file upload.
Available options:
multipart/form-data Body
multipart/form-data
The purpose of the file. Supported values and formats:
- prompt_audio: Sample Audio for Voice Cloning(supports mp3, m4a, wav)
Available options:
prompt_audio Example:
"prompt_audio"
The file to upload. Provide the path to the audio file.
Requirements for uploaded files:
- Format: mp3, m4a, wav
- Duration: less than 8 seconds
- Size: up to 20 MB
⌘I