curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "heygen-video-agent",
"prompt": "A weather reporter in front of a sunny city skyline introducing today's forecast in an upbeat tone."
}
EOF{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Bad request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}HeyGen Video Agent
- HeyGen Video Agent: an intelligent video agent that automatically generates digital avatar videos from just a prompt
- Optionally specify avatar, voice, style, and orientation; video duration is automatically determined by the Agent
- Asynchronous processing mode — use the returned task ID to check task status
- Generated video links are valid for 24 hours; please save them promptly
curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "heygen-video-agent",
"prompt": "A weather reporter in front of a sunny city skyline introducing today's forecast in an upbeat tone."
}
EOF{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Bad request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Authorizations
All endpoints require Bearer Token authentication
Add the following header to your request:
Authorization: Bearer YOUR_API_KEY
Body
heygen-video-agent: intelligent video agent that automatically generates digital avatar videos
"heygen-video-agent"
Natural language prompt describing the desired video content
Notes:
- Maximum 10,000 characters
- Video Agent autonomously decides casting, scripting, scene arrangement, and editing
- Output video duration is determined by the model; clients cannot specify it
10000"A weather reporter in front of a sunny city skyline introducing today's forecast."
HeyGen avatar identifier to use
Notes:
- Omit or leave empty → Video Agent auto-selects
- You can pass a HeyGen official avatar ID, or
autoto let the model decide
"Anna_public_3_20240108"
HeyGen voice identifier to use
Notes:
- Omit or leave empty → Video Agent auto-selects
- You can pass a HeyGen official voice ID, or
autoto let the model decide
"en-US-Studio-O"
HeyGen visual style template ID
Notes:
- Controls scene composition, pacing, and aesthetics
- Omit to use the default style
"modern_vlog_01"
Output video orientation
Options:
landscape— horizontalportrait— vertical- Omit → Video Agent decides automatically
landscape, portrait "landscape"
List of reference material URLs (images / videos / audio / PDFs)
Notes:
- Up to 20 URLs
Do not pass this parameter unless necessary.
["https://example.com/screenshot-1.png"]
Whether to enable incognito mode (disable agent memory)
Do not pass this parameter unless necessary.
true
Response
Task created successfully
Task creation timestamp
1757165031
Task ID
"task-unified-1757165031-uyujaw3d"
Model name actually used
Specific type of the task
video.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Async task information
Show child attributes
Show child attributes
Output type of the task
video "video"