curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dashscope/happyhorse-1.0",
"prompt": "一座由硬纸板和瓶盖搭建的微型城市,在夜晚焕发出生机。一列硬纸板火车缓缓驶过,小灯点缀其间,照亮前路。",
"resolution": "720P",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"task_id": "task_2044275355061448704",
"model": "dashscope/happyhorse-1.0",
"created_at": "2026-04-27T10:43:20.233Z",
"request_id": "67e2e394-cf6f-4998-b293-ebf20d14dc26"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "aspect_ratio is not accepted in I2V mode (output follows first_frame)",
"status": 400,
"request_id": "req_abc123"
}
}HappyHorse 1.0
HappyHorse 1.0 视频生成模型,支持文生视频、图生视频(首帧)、参考生视频(多参考图)、视频编辑(视频 + 参考图)
curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dashscope/happyhorse-1.0",
"prompt": "一座由硬纸板和瓶盖搭建的微型城市,在夜晚焕发出生机。一列硬纸板火车缓缓驶过,小灯点缀其间,照亮前路。",
"resolution": "720P",
"aspect_ratio": "16:9",
"duration": 5
}
'{
"task_id": "task_2044275355061448704",
"model": "dashscope/happyhorse-1.0",
"created_at": "2026-04-27T10:43:20.233Z",
"request_id": "67e2e394-cf6f-4998-b293-ebf20d14dc26"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "aspect_ratio is not accepted in I2V mode (output follows first_frame)",
"status": 400,
"request_id": "req_abc123"
}
}授权
在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。前往 API Keys 管理页 创建和管理 API Key。
请求体
固定值 dashscope/happyhorse-1.0
提示词,长度不超过 5000 字符。支持中、英、日、韩等多语言。
参考生视频场景下,
prompt中可用character1、character2… 指代reference_images中第 N 张参考图(顺序与数组一致)。
"一座由硬纸板和瓶盖搭建的微型城市,在夜晚焕发出生机。一列硬纸板火车缓缓驶过,小灯点缀其间,照亮前路。"
输出分辨率,默认 1080P。
720P, 1080P 输出宽高比,默认 16:9。仅文生视频与参考生视频接受;图生视频-首帧(输出跟随首帧)、视频编辑(输出跟随源视频)不接受此参数。
16:9, 9:16, 1:1, 4:3, 3:4 视频时长(秒),默认 5,取值范围 3 ~ 15 的整数。视频编辑场景不接受此参数(输出时长跟随源视频,最长 15 秒)。
3 <= x <= 15参考图列表。按 reference_type 与 reference_videos 的组合决定输入模式:
- 图生视频-首帧:1 张
first_frame - 参考生视频:1~9 张
asset,无reference_videos - 视频编辑:0~5 张
asset,配合 1 段reference_videos
图片要求:格式
jpg/jpeg/png/webp;公网可访问 URL 或data:image/base64;首帧场景宽高 ≥ 300 px、宽高比 1:2.5 ~ 2.5:1、单张 ≤ 10 MB;参考生视频场景短边 ≥ 400 px,推荐 720P 以上。
9Show child attributes
Show child attributes
视频编辑必须显式提供 1 段 reference_type=edit_source 的原视频,可搭配 0~5 张 asset 参考图。普通 asset 视频会被忽略,不会触发编辑。
视频要求:格式
mp4/mov(建议 H.264 编码);时长 3 ~ 60 秒(超过 15 秒会从头自动截取前 15 秒);分辨率长边 ≤ 2160 px、短边 ≥ 320 px;宽高比 1:2.5 ~ 2.5:1;单段 ≤ 100 MB;FPS > 8。
1Show child attributes
Show child attributes
模型扩展参数,全部选填:
audio_setting— 字符串,仅视频编辑场景生效。声音控制策略:auto(默认):由模型自动决定origin:保留源视频的原始声音
Show child attributes
Show child attributes

