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=t2a_async_input \
--form file='@example-file'{
"file": {
"file_id": "${file_id}",
"bytes": 5896337,
"created_at": 1700469398,
"filename": "MiniMax Open Platform-Test bot.docx",
"purpose": "t2a_async_input"
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}File Management
Upload File
Upload a file on the MiniMax API Platform.
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=t2a_async_input \
--form file='@example-file'{
"file": {
"file_id": "${file_id}",
"bytes": 5896337,
"created_at": 1700469398,
"filename": "MiniMax Open Platform-Test bot.docx",
"purpose": "t2a_async_input"
},
"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. The values and supported formats are as follows:
- voice_clone: For quick cloning of the original voice file (supports mp3, m4a, wav formats).
- prompt_audio: Sample audio for voice cloning (supports mp3, m4a, wav formats).
- t2a_async_input: Text file in the request body for asynchronous long-text-to-speech synthesis.
- video_understanding: Video file for multimodal understanding, referenced in chat requests as
mm_file://{file_id}and retained for up to 7 days (supports MP4, AVI, MOV, MKV formats).
Available options:
voice_clone, prompt_audio, t2a_async_input, video_understanding Example:
"t2a_async_input"
The file to be uploaded.
⌘I