Skip to main content
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=voice_clone \
  --form file=@example-file
{
  "file": {
    "file_id": 123456789012345680,
    "bytes": 5896337,
    "created_at": 1700469398,
    "filename": "audio_sample.mp3",
    "purpose": "voice_clone"
  },
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}

Authorizations

Authorization
string
header
required

HTTP: Bearer Auth

Headers

Content-Type
enum<string>
default:multipart/form-data
required

Indicates the request is a multipart file upload.

Available options:
multipart/form-data

Body

multipart/form-data
purpose
enum<string>
default:voice_clone
required

The purpose of the file. Supported values and formats:

  • voice_clone: For fast voice cloning of the original audio file. Supported formats: mp3, m4a, wav
Available options:
voice_clone
Example:

"voice_clone"

file
file
required

The file to upload. Provide the path to the audio file.

Requirements for uploaded files:

  • Formats: mp3, m4a, wav
  • Duration: Minimum 10 seconds, maximum 5 minutes
  • Size: Must not exceed 20 MB

Response

200 - application/json
file
object
base_resp
object