Animate this first frame as one continuous five-second intimate documentary shot. Preserve this adult ceramic artist, face, clay vessel, hands, clothing and sunlit pottery studio. The wheel rotates gently while both wet hands steadily guide the rim without changing the vessel into another object. The artist glances up and calmly says exactly in Mandarin Chinese, "慢一点,形就稳了。" Clearly synchronized lips, natural small hand movements, soft wheel hum and wet-clay rubbing sounds. Very slow camera push-in, no cuts, no music. No logos, brands, advertising, captions, subtitles or watermarks.
Happy Horse 1.1 Image to Video API
alibaba/happyhorse-1.1/image-to-videoHappy Horse 1.1 Image to Video 将单张静态图片转化为 3–15 秒 720p 或 1080p 电影级动态视频,支持原生同步音频合成、自然物理动态呈现与丰富肌理细节。它能够在严格保留原图主体面貌、光影氛围与构图基调的同时,呈现逼真的运镜轨迹、人物微表情与环境音效。
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/1 个素材
示例
REST API
快速开始
使用 API 认证,提交首帧图片与可选提示词,通过任务 ID 获取生成的动态视频。
连接到 Vidgo API
创建 API 密钥,仅保存在服务器上,并发送 Authorization: Bearer VIDGO_API_KEY。
- 端点
- POST
https://api.vidgo.ai/api/generate/submit - 认证
- Authorization: Bearer VIDGO_API_KEY
提交一次图生视频任务
按请求示例填写输入,image_urls 中包含 1 张图片地址,model 必须是 alibaba/happyhorse-1.1/image-to-video。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.1/image-to-video",
"input": {
"prompt": "Animate this first frame as one continuous five-second intimate documentary shot. Preserve this adult ceramic artist, face, clay vessel, hands, clothing and sunlit pottery studio. The wheel rotates gently while both wet hands steadily guide the rim without changing the vessel into another object. The artist glances up and calmly says exactly in Mandarin Chinese, \"慢一点,形就稳了。\" Clearly synchronized lips, natural small hand movements, soft wheel hum and wet-clay rubbing sounds. Very slow camera push-in, no cuts, no music. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11101,
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/image-to-video/v1/01/input-01.png"
]
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"等待结果
用 task_id 查询,not_started/running 时继续,finished/failed 时停止。成功后读取 data.files[].file_url。
跟踪状态
GET https://api.vidgo.ai/api/generate/status/{task_id}以 2 秒为基准轮询状态,任务较长时加大间隔。仅在 not_started 或 running 时继续,finished 或 failed 时停止。也可以在请求中指定 callback_url 接收 webhook。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "8JNIJZHJGDA8ALKR",
"status": "running",
"created_time": "2026-09-21T17:18:07"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}完整可运行示例
展开查看包含 HTTP 与业务码检查、task_id 校验、轮询、终态处理和超时边界的完整代码。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.1/image-to-video",
"input": {
"prompt": "Animate this first frame as one continuous five-second intimate documentary shot. Preserve this adult ceramic artist, face, clay vessel, hands, clothing and sunlit pottery studio. The wheel rotates gently while both wet hands steadily guide the rim without changing the vessel into another object. The artist glances up and calmly says exactly in Mandarin Chinese, \"慢一点,形就稳了。\" Clearly synchronized lips, natural small hand movements, soft wheel hum and wet-clay rubbing sounds. Very slow camera push-in, no cuts, no music. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11101,
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/happyhorse-1.1/image-to-video/v1/01/input-01.png"
]
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done输入参数
下表列出可用输入参数、类型和默认值。请求示例还包含顶层 model 字段。
| 字段 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
| prompt | string | null | 否 | — | 去除首尾空白后最多 2500 个 Unicode 字符。可省略;null、空字符串或纯空白会被忽略。 |
| image_urls | string[] | 是 | — | 恰好 1 张首帧图片,支持公开 HTTP(S) URL、图片 Data URI 或原始 Base64。 |
| resolution | string | 否 | 1080p | 720p 或 1080p,默认 1080p。 |
| duration | integer | 否 | 5 | 3–15 秒整数,默认 5 秒。 |
| seed | integer | 否 | — | 可选整数,范围 0–2147483647。不指定时省略。 |
| enable_safety_checker | boolean | 否 | — | 可选布尔值;未指定时不发送。 |
响应字段
提交任务返回 task_id;状态查询接口返回生命周期进度和视频资源。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务响应码,成功为 200。 |
| data.task_id | string | 用于轮询进度的唯一任务标识。 |
| data.status | string | 生命周期状态:not_started、running、finished 或 failed。 |
| data.progress | integer | 生成进度百分比 (0–100)。 |
| data.files[].file_url | string | 生成的视频资源公开下载链接。 |
| data.files[].file_type | string | 文件类型标识,例如 video。 |
| data.error_message | string | null | 任务失败时的具体错误说明。 |
任务生命周期
仅在 not_started 或 running 时继续轮询,进入 finished 或 failed 时停止。
not_started任务已在队列中排队,等待执行。
running任务正在生成中,请保持轮询。
finished任务已完成,可从 data.files[].file_url 读取视频地址。
failed任务生成失败,请读取 data.error_message 并停止轮询。
轮询与错误处理
- 认证遇到 401 时,检查 Authorization 中的 Bearer API key,更新凭证后重试。
- 校验遇到 400 时,根据响应检查必填输入、参数值和可用积分,再重新提交。
- 网络和超时状态查询遇到网络错误或超时,保留原 task_id 并重试查询。
- 轮询间隔以 2 秒为基准轮询状态,任务较长时逐步加大间隔。
- 终态仅在 not_started 或 running 时继续。finished 或 failed 立即停止。
- 回调选项可在请求顶层提供 callback_url 接收最终任务对象;投递失败时仍可轮询。
端点限制
| 规格 | 值 | 详情 |
|---|---|---|
| prompt | 2500 | 去除首尾空白后最多 2500 个 Unicode 字符。可省略;null、空字符串或纯空白会被忽略。 |
| image_urls | 1 | 恰好 1 张首帧图片,支持公开 HTTP(S) URL、图片 Data URI 或原始 Base64。 |
| resolution | 1080p | 720p 或 1080p,默认 1080p。 |
| duration | 5 | 3–15 秒整数,默认 5 秒。 |
相关模型
Happy Horse 1.1 Image to Video API 常见问题
Happy Horse 1.1 Image to Video API 是什么?
Happy Horse 1.1 Image to Video 是阿里巴巴研发的单图生成视频模型。它将单张静态首帧图像转化为 3–15 秒 720p 或 1080p 电影级高保真视频,具备原生同步音频生成、自然物理动态呈现与丰富肌理细节。基于统一的单流自注意力 Transformer 架构,它在严格保留原图主体面貌、构图光影与色彩基调的同时,呈现逼真的运镜轨迹与环境声音。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Happy Horse 1.1 Image to Video 如何保持原图中的人物身份一致?
模型直接将输入首帧的深层视觉特征作为时空演化的起点与约束,在动态运动与视角变化中始终锚定角色的面部结构、发型与服饰纹理,避免换脸或五官失真。
Happy Horse 1.1 Image to Video 可以在不写提示词的情况下生成视频吗?
可以。当 prompt 参数留空或未填写时,模型会自动分析画面空间结构与视觉元素,依据常识物理规律推演合理的动态效果与匹配的自然环境声音。
Happy Horse 1.1 Image to Video 生成的视频带有声音吗?
带有声音。模型采用单次前向音画联合生成机制,不仅根据画面生成微风、水流、引擎等环境声,还支持根据提示词中的对白内容生成同步台词与对应口型。
Happy Horse 1.1 Image to Video 生成的视频画幅比例由什么决定?
生成视频的宽高比由上传的首帧输入图片原生比例决定。模型会自动适配原图尺寸,请求时无须传入额外的 aspect_ratio 参数。
哪些图片格式和画质更适合 Happy Horse 1.1 Image to Video?
建议使用主体对焦清晰、光照均匀、无明显压缩伪影的 JPG、PNG 或 WEBP 格式图片。主体轮廓清晰的肖像或景物通常能获得最平稳的动作演化。
如何在 Happy Horse 1.1 Image to Video 中控制镜头运镜?
你可以在提示词中使用影视运镜词汇(例如镜头缓慢推向面部特写、向右平移追踪主体或轻微手持跟随感)。将运镜描述单独写成一句可获得最佳遵循度。
Happy Horse 1.1 Image to Video 的点数如何扣除?
费用按请求生成的整秒数乘以对应画质费率计算:720p 为每秒 22 点数,1080p 为每秒 28 点数。生成失败或异常终止将全额退还扣除点数。









