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": "请求格式错误",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "参数校验失败",
"type": "validation_error"
}
}{
"error": {
"message": "请求频率超限",
"type": "rate_limit_error"
}
}{
"error": {
"message": "服务器内部错误",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}HeyGen
HeyGen Video Agent
- HeyGen Video Agent 智能视频代理,仅需提示词即可自动完成数字人视频生成
- 可选指定头像、声音、风格和画面方向;视频时长由 Agent 自动决定
- 异步处理模式,使用返回的任务ID 进行查询
- 生成的视频链接,有效期为24小时,请尽快保存
POST
/
v1
/
videos
/
generations
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": "请求格式错误",
"type": "invalid_request_error"
}
}{
"error": {
"message": "API密钥无效",
"type": "authentication_error"
}
}{
"error": {
"message": "账户余额不足",
"type": "insufficient_quota"
}
}{
"error": {
"message": "参数校验失败",
"type": "validation_error"
}
}{
"error": {
"message": "请求频率超限",
"type": "rate_limit_error"
}
}{
"error": {
"message": "服务器内部错误",
"type": "server_error"
}
}{
"error": {
"message": "服务暂不可用,请稍后重试",
"type": "service_unavailable"
}
}授权
所有接口均需要使用Bearer Token进行认证
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
heygen-video-agent:智能视频代理,自动生成数字人视频
示例:
"heygen-video-agent"
自然语言 prompt,描述希望生成的视频内容
说明:
- 最长 10000 字符
- Video Agent 会自主决定选角、脚本、场景编排与剪辑
- 输出视频时长由模型自主决定,客户端无法指定
Maximum string length:
10000示例:
"A weather reporter in front of a sunny city skyline introducing today's forecast."
指定使用的 HeyGen avatar 标识
说明:
- 不传或留空 → 由 Video Agent 自动挑选
- 可传 HeyGen 官方 avatar ID,也可传
auto交由模型决定
示例:
"Anna_public_3_20240108"
指定使用的 HeyGen voice 标识
说明:
- 不传或留空 → 由 Video Agent 自动挑选
- 可传 HeyGen 官方 voice ID,也可传
auto交由模型决定
示例:
"en-US-Studio-O"
HeyGen 视觉风格模板 ID
说明:
- 控制场景构图、节奏与美学
- 不传则使用默认风格
示例:
"modern_vlog_01"
输出视频方向
可选值:
landscape— 横屏portrait— 竖屏- 不传 → 由 Video Agent 自动判断
可用选项:
landscape, portrait 示例:
"landscape"
参考素材 URL 列表(图片 / 视频 / 音频 / PDF)
说明:
- 最多 20 个 URL
非必须不要传这个参数。
示例:
["https://example.com/screenshot-1.png"]
是否启用无痕模式(禁用 agent 记忆)
非必须不要传这个参数。
示例:
true
响应
任务创建成功
任务创建时间戳
示例:
1757165031
任务ID
示例:
"task-unified-1757165031-uyujaw3d"
实际使用的模型名称
任务的具体类型
可用选项:
video.generation.task 任务进度百分比 (0-100)
必填范围:
0 <= x <= 100示例:
0
任务状态
可用选项:
pending, processing, completed, failed 示例:
"pending"
异步任务信息
Show child attributes
Show child attributes
任务的输出类型
可用选项:
video 示例:
"video"