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=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

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>
required

The purpose of the file. The values and supported formats are as follows:

  1. voice_clone: For quick cloning of the original voice file (supports mp3, m4a, wav formats).
  2. prompt_audio: Sample audio for voice cloning (supports mp3, m4a, wav formats).
  3. t2a_async_input: Text file in the request body for asynchronous long-text-to-speech synthesis.
Available options:
voice_clone,
prompt_audio,
t2a_async_input
Example:

"t2a_async_input"

file
file
required

The file to be uploaded.

Response

200 - application/json
file
object
base_resp
object