Retrieve video
September 25, 2024
Table of contents
Use this endpoint to retrieve status and results of
https://api.useapi.net/v1/minimax/videos/
videoId
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
- API tokenis required, see Setup useapi.net for details.
Path parameter
- videoIdis required. Specify the videoId you want to retrieve.
Responses
-   { "id": "id", "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, "percent": 100, "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:id" }
-   { "error": "<Error message>", "code": 400 }
-   { "error": "Unauthorized", "code": 401 }
-   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
- 3 failed
- 5 moderated
- 7 moderated
- 11 queued
- 12 processing
- 14 moderated
Optional fields message and percent will contain generation progress information.
{   // TypeScript, all fields are optional
    id: string
    desc: string
    coverURL: string
    videoURL: string
    downloadURL: string
    status: number
    statusLabel: string
    statusFinal: boolean
    message: string // Contains the message shown to the user while the video is being processed
    percent: number // Contains 0-100 percent while the video is being processed
    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/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())