curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "happyhorse-1.0-reference-to-video",
"prompt": "@Image1 dancing on a moonlit stage",
"image_urls": [
"https://example.com/character.jpg"
],
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "1080p"
}
'{
"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"
}
}Happy Horse
HappyHorse 1.0 参考视频生成
- HappyHorse 1.0 多角色参考生视频模型,1-9 张参考图驱动视频生成
- prompt 中可使用
@Image1~@Image9引用对应参考图 - 支持
720p/1080p输出,3-15 秒时长 - 异步处理模式,使用返回的任务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 '
{
"model": "happyhorse-1.0-reference-to-video",
"prompt": "@Image1 dancing on a moonlit stage",
"image_urls": [
"https://example.com/character.jpg"
],
"aspect_ratio": "16:9",
"duration": 5,
"resolution": "1080p"
}
'{
"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
happyhorse-1.0-reference-to-video:参考图生视频
示例:
"happyhorse-1.0-reference-to-video"
视频生成提示词,可使用 @Image1 ~ @Image9 引用对应参考图
说明:
- 最多
2500个字符
Maximum string length:
2500示例:
"@Image1 and @Image2 training together at sunrise"
参考图片 URL 列表,1-9 张
说明:
- 支持 JPEG / PNG / WEBP
- 短边 ≥
400px - 每张图片大小上限
10MB - 数组顺序对应 prompt 中的
@Image1~@Image9
Required array length:
1 - 9 elements示例:
["https://example.com/character.jpg"]
输出视频宽高比
可选值: 16:9、9:16、1:1、4:3、3:4
可用选项:
16:9, 9:16, 1:1, 4:3, 3:4 示例:
"16:9"
输出视频时长(秒),支持 3-15 的整数秒
必填范围:
3 <= x <= 15示例:
3
输出视频分辨率,可选 720p 或 1080p
可用选项:
720p, 1080p 示例:
"720p"
随机种子,用于提升结果复现性
必填范围:
0 <= x <= 2147483647示例:
123
是否启用安全检查,不传则使用模型默认行为
非必须不要传这个参数。
示例:
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"