Retrieve video

Table of contents

  1. Request Headers
  2. Path parameter
  3. Responses
  4. Model
  5. Examples
  6. Try It

https://api.useapi.net/v1/minimax/videos/videoId

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Path parameter
  • videoId is required. Specify the videoId you want to retrieve.
Responses
  • 200 OK

    {
      "id": "id",
      "desc": "<prompt>",
      "coverURL": "<cover url>",
      "videoURL": "<generated video url>",
      "status": 2,
      "percent": 100,
      "canRetry": false,
      "videoId": "user:user_id-minimax:account-video:id"
    }
    
  • 400 Bad Request

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

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    This most often means that the video was moderated and removed after it was generated.

    {
        "error": "Not found.",
        "code": 404
    }
    
Model

Known status values:

  • 0 Pending
  • 1 Processing
  • 2 Completed
{   // TypeScript, all fields are optional
    id: string
    desc: string
    coverURL: string
    videoURL: string
    status: number
    message: string
    percent: number
    canRetry: boolean
    videoId: string
}
Examples
  • curl "https://api.useapi.net/v1/minimax/videos/videoId" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const videoId = "videoId to retrieve"; 
    const apiUrl = `https://api.useapi.net/v1/minimax/videos/${videoId}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    videoId = "videoId to retrieve"
    apiUrl = f"https://api.useapi.net/v1/minimax/videos/{videoId}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It