# POST /minimax/v1/files/upload

**Method**: `POST`
**Endpoint**: `/minimax/v1/files/upload`

[Official Documentation](https://platform.minimaxi.com/docs/api-reference/voice-cloning-uploadcloneaudio)

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

## Request Parameters

### Header Parameters

```text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}
```

### Body Parameters multipart/form-data Required

```text
purpose
string
Required
purpose
enumdefault:voice_clonerequired
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
Example:
"voice_clone"
Example:
voice_clone
file
file
Required
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
Example:
example-file
```

## Example Request

### Shell

```bash
curl --location --request POST '/minimax/v1/files/upload' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'purpose="voice_clone"' \
--form 'file=@"example-file"'
```

## Response

### 🟢 200 Success

**Content Type**: `application/json`

#### Response Schema

```text
file
object
Optional
file_id
integer
Unique identifier of the file
Optional
bytes
integer
Optional
File size in bytes
created_at
integer
Optional
Unix timestamp in seconds when the file was created
filename
string
File name
Optional
purpose
string
Purpose of the file.
Optional
base_resp
object
Optional
status_code
integer
Required
Status codes and their meanings are listed below:
0, request succeeded
1002, rate limit triggered, please try again later
1004, account authentication failed, please check whether the API key is correct
1008, insufficient account balance
1026, the image description contains sensitive content
2013, invalid input parameters, please verify the request body
2049, invalid API key
status_msg
string
Status Details
Required
```

#### Example

```json
{
    "file": {
        "file_id": "${file_id}",
        "bytes": 5896337,
        "created_at": 1700469398,
  // provider-specific example normalized for English documentation
        "purpose": "voice_clone"
    },
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}
```
