Retrieve available agent video templates
June 30, 2025
Table of contents
Use hailuoai.video account to retrieve available agent video templates, see Setup MiniMax for details.
Templates can be used with POST videos/agent-create to generate videos.
https://api.useapi.net/v1/minimax/videos/agent-templates/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API token
is required, see Setup useapi.net for details.
Query Parameters
-
account
is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
templateId
is optional, specify a template ID to get detailed information for a specific template including input requirements. -
limit
is optional, specify the number of templates to return. Default 30. -
lastId
is optional, specify the template id from where to start pagination.
Responses
-
Template List Response (when
templateId
is not provided):{ "videoList": [ { "id": "1122334455667788", "createTime": 1702953600000, "videoAsset": { "id": "video_asset_id", "desc": "Template description", "coverURL": "https://example.com/cover.jpg", "videoURL": "https://example.com/video.mp4", "status": 2, "width": 1280, "height": 720, "duration": 10, "resolution": 1, "title": "Template Title", "agentTemplateID": "1122334455667788", "agentTemplateName": "Template Name", "downloadURL": "https://example.com/download.mp4", "hasVoice": true, "modelID": "model_123", "useOriginPrompt": false, "isBookmarked": false, "disableGenerateSimilar": false, "postStatus": 1, "userID": 123456, "createType": 1, "promptImgURL": "https://example.com/prompt.jpg", "aspectRatio": "16:9", "tags": [ { "type": "style", "tagIcon": "https://example.com/icon.png", "tagText": "Cinematic" } ], "humanCheckStatus": 1, "userIDStr": "123456" }, "like": { "likes": 42, "likeStatus": 0 }, "author": { "userID": "user123", "name": "Author Name", "avatar": "https://example.com/avatar.jpg" }, "cardType": 1, "tabID": "template" } ], "hasPre": false, "hasNext": true }
Template Details Response (when
templateId
is provided):{ "id": "1122334455667788", "createTime": 1702953600000, "videoAsset": { "id": "video_asset_id", "desc": "Template description", "coverURL": "https://example.com/cover.jpg", "videoURL": "https://example.com/video.mp4", "status": 2, "width": 1280, "height": 720, "duration": 10, "resolution": 1, "title": "Template Title", "agentTemplateID": "1122334455667788", "agentTemplateName": "Template Name" }, "like": { "likes": 42, "likeStatus": 0 }, "author": { "userID": "user123", "name": "Author Name", "avatar": "https://example.com/avatar.jpg" }, "cardType": 1, "tabID": "template", "credits": 100, "requirePrompt": true, "requireImage": true, "prompt": "Template prompt", "inputs": [ { "name": "text_input", "type": "text", }, { "name": "image_input", "type": "image", } ] }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
-
{ "error": "The video or template you are trying to use does not exist or has been deleted." }
Model
{ // TypeScript, template list response
videoList: {
id: string
createTime: number
videoAsset: {
id: string
desc: string
coverURL: string
videoURL: string
status: number
width: number
height: number
duration: number
resolution: number
title: string
agentTemplateID: string
agentTemplateName: string
downloadURL?: string
hasVoice?: boolean
modelID?: string
useOriginPrompt?: boolean
isBookmarked?: boolean
disableGenerateSimilar?: boolean
postStatus?: number
userID?: number
createType?: number
promptImgURL?: string
aspectRatio?: string
tags?: {
type: string
tagIcon: string
tagText: string
}[]
humanCheckStatus?: number
userIDStr?: string
}
like: {
likes: number
likeStatus: number
}
author: {
userID: string
name: string
avatar: string
}
cardType: number
tabID: string
}[]
hasPre: boolean
hasNext: boolean
}
{ // TypeScript, template details response (when templateId provided)
id: string
createTime: number
videoAsset: {} // Same structure as above
like: {} // Same structure as above
author: {} // Same structure as above
cardType: number
tabID: string
credits: number
requirePrompt: boolean
requireImage: boolean
prompt: string
inputs: {
name: string
type: "text" | "image"
}[]
}
Examples
-
# Get list of templates curl "https://api.useapi.net/v1/minimax/videos/agent-templates/?account=account&limit=10" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" # Get specific template details curl "https://api.useapi.net/v1/minimax/videos/agent-templates/?templateId=1122334455667788" \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
// Get list of templates const token = "API token"; const account = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/minimax/videos/agent-templates/?account=${account}&limit=10`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("Templates:", {response, result}); // Get specific template details const templateId = "1122334455667788"; const detailUrl = `https://api.useapi.net/v1/minimax/videos/agent-templates/?templateId=${templateId}`; const detailResponse = await fetch(detailUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const templateDetails = await detailResponse.json(); console.log("Template details:", {detailResponse, templateDetails});
-
import requests # Get list of templates token = "API token" account = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/minimax/videos/agent-templates/?account={account}&limit=10" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print("Templates:", response, response.json()) # Get specific template details template_id = "1122334455667788" detail_url = f"https://api.useapi.net/v1/minimax/videos/agent-templates/?templateId={template_id}" detail_response = requests.get(detail_url, headers=headers) print("Template details:", detail_response, detail_response.json())