Retrieve the list of videos you have generated

September 25, 2024 (October 11, 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 generated videos, see Setup MiniMax for details.

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

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 videos to return. Default 30.

  • lastVideoId is optional, specify the video id from where to start.

Responses
  • 200 OK

    [
        {
            "id": "video_id_#1",
            "desc": "",
            "coverURL": "",
            "videoURL": "",
            "status": 1,
            "statusLabel": "processing",
            "statusFinal": false,
            "message": "<Message from chairman Xi>",
            "width": 0,
            "height": 0,
            "originFiles": [],
            "canAppeal": false,
            "canRetry": false,
            "videoId": "user:user_id-minimax:account-video:video_id_#1"
        },
        {
            "id": "video_id_#2",
            "desc": "<prompt>",
            "coverURL": "<cover url>",
            "videoURL": "<generated video with watermark url>",
            "downloadURL": "<generated video without watermark (paid accounts) url>",
            "status": 2,
            "statusLabel": "completed",
            "statusFinal": true,
            "width": 1300,
            "height": 760,
            "originFiles": [
                {
                    "id": "user:user_id-minimax:account-file:file_id",
                    "url": "<file url>",
                    "type": "png"
                }
            ],
            "canAppeal": false,
            "canRetry": false,
            "videoId": "user:user_id-minimax:account-video:video_id_#2"
        }
    ]
    
  • 400 Bad Request

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

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model

Known status values:

  • 0 pending
  • 1 processing
  • 2 completed
  • 5 moderated
  • 11 queued
{   // TypeScript, all fields are optional
    id: string
    desc: string
    coverURL: string
    videoURL: string
    downloadURL: string
    status: number
    statusLabel: string
    statusFinal: boolean
    message: string,
    width: number
    height: number
    originFiles: {
      id: string
      url: string
      type: string
    }[]
    canAppeal: boolean
    canRetry: boolean
    videoId: string
}[]
Examples
  • curl "https://api.useapi.net/v1/minimax/videos/?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/videos/?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/videos/?account={account}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It