Retrieve the list of images you have uploaded

October 14, 2024

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

Use hailuoai.video account to retrieve list of uploaded images, see Setup MiniMax for details.

This endpoint will return a list of all the images you’ve used previously to generate videos. Only images that were actually used for generation will be shown.

https://api.useapi.net/v1/minimax/files/?…

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Query Parameters
  • account is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.

  • limit is optional, specify the number of files to return. Default 10.

Responses
  • 200 OK

    [
        {
            "file_id": "user:user_id-minimax:account-file:file_id_#1",
            "file_name": "<file name>",
            "file_type": "jpeg",
            "cdn_url": "<file ulr>",
            "oss_path": "<file path with name>",
            "file_scene": 10,
            "file_status": 1
        },
        {
            "file_id": "user:user_id-minimax:account-file:file_id_#n",
            "file_name": "<file name>",
            "file_type": "png",
            "cdn_url": "<file ulr>",
            "oss_path": "<file path with name>",
            "file_scene": 10,
            "file_status": 1
        }
    ]
    
  • 400 Bad Request

    {
        "error": "<Error message>",
        "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  file_id: string
  file_name: string
  file_type: string
  cdn_url: string
  oss_path: string
  file_scene: number
  file_status: number
}[]
Examples
  • curl "https://api.useapi.net/v1/minimax/files/?account=account" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const account = "Previously configured account"; 
    const apiUrl = `https://api.useapi.net/v1/minimax/files/?account=${account}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    account = "Previously configured account"
    apiUrl = f"https://api.useapi.net/v1/minimax/files/?account={account}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It