Skip to main content
GET
/
v1
/
files
/
list
List Files
curl --request GET \
  --url https://api.minimax.io/v1/files/list \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.minimax.io/v1/files/list"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.minimax.io/v1/files/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimax.io/v1/files/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.minimax.io/v1/files/list"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.minimax.io/v1/files/list")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.minimax.io/v1/files/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "files": [
    {
      "file_id": "${file_id}",
      "bytes": 5896337,
      "created_at": 1699964873,
      "filename": "297990555456011.tar",
      "purpose": "t2a_async_input"
    },
    {
      "file_id": "${file_id}",
      "bytes": 5896337,
      "created_at": 1700469398,
      "filename": "297990555456911.tar",
      "purpose": "t2a_async_input"
    }
  ],
  "base_resp": {
    "status_code": 0,
    "status_msg": "success"
  }
}

Authorizations

Authorization
string
header
required

HTTP: Bearer Auth

Query Parameters

purpose
enum<string>
required

The purpose category of the files to list. 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 (supports txt, zip formats).
Available options:
voice_clone,
prompt_audio,
t2a_async_input
Example:

"t2a_async_input"

Response

200 - application/json
files
object[]

List of files

base_resp
object