One continuous cinematic medium shot of an adult female glaciologist in a mustard expedition jacket on a safe rocky overlook beside a blue glacier in clear cold daylight. Her uncovered face remains large and readable. Over five seconds she turns slightly toward the camera, quietly says exactly in English, "Listen—the ice is moving.", then listens as a distant deep ice crack rolls across the valley. Slow subtle camera push-in, realistic breath and restrained expression. Accurate visible lip synchronization, soft wind and one distant cracking sound, no music. No collapse or disaster. No logos, brands, advertising, captions, subtitles or watermarks.
Happy Horse 1.1 Text to Video API
alibaba/happyhorse-1.1/text-to-videoHappy Horse 1.1 Text to Video 将纯文本提示词转化为 3–15 秒 720p 或 1080p 电影级视频,支持原生单次前向音视频合成、7 种语言高保真口型同步与生动的物理动作表现。它能够在严格遵循复杂场景与分镜描述的同时保持时空连贯性,并在单次推理中同步输出对白、环境音效与配乐。
示例
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
提交一次生成任务
按请求示例填写输入,model 必须是 alibaba/happyhorse-1.1/text-to-video,并保存返回的 task_id。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/happyhorse-1.1/text-to-video",
"input": {
"prompt": "One continuous cinematic medium shot of an adult female glaciologist in a mustard expedition jacket on a safe rocky overlook beside a blue glacier in clear cold daylight. Her uncovered face remains large and readable. Over five seconds she turns slightly toward the camera, quietly says exactly in English, \"Listen—the ice is moving.\", then listens as a distant deep ice crack rolls across the valley. Slow subtle camera push-in, realistic breath and restrained expression. Accurate visible lip synchronization, soft wind and one distant cracking sound, no music. No collapse or disaster. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11001,
"aspect_ratio": "16:9"
}
}
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": "NPWT1EXYV382D336",
"status": "running",
"created_time": "2026-09-21T17:16:09"
}
}{
"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/text-to-video",
"input": {
"prompt": "One continuous cinematic medium shot of an adult female glaciologist in a mustard expedition jacket on a safe rocky overlook beside a blue glacier in clear cold daylight. Her uncovered face remains large and readable. Over five seconds she turns slightly toward the camera, quietly says exactly in English, \"Listen—the ice is moving.\", then listens as a distant deep ice crack rolls across the valley. Slow subtle camera push-in, realistic breath and restrained expression. Accurate visible lip synchronization, soft wind and one distant cracking sound, no music. No collapse or disaster. No logos, brands, advertising, captions, subtitles or watermarks.",
"duration": 5,
"resolution": "1080p",
"seed": 11001,
"aspect_ratio": "16:9"
}
}
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 | 是 | — | 去除首尾空白后最多 2500 个 Unicode 字符。必须填写非空提示词。 |
| resolution | string | 否 | 1080p | 720p 或 1080p,默认 1080p。 |
| duration | integer | 否 | 5 | 3–15 秒整数,默认 5 秒。 |
| aspect_ratio | string | 否 | 16:9 | 支持 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, 9:21,默认 16:9。 |
| 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 字符。必须填写非空提示词。 |
| resolution | 1080p | 720p 或 1080p,默认 1080p。 |
| duration | 5 | 3–15 秒整数,默认 5 秒。 |
| aspect_ratio | 16:9 | 支持 21:9, 16:9, 4:3, 1:1, 3:4, 4:5, 5:4, 9:16, 9:21,默认 16:9。 |
相关模型
Happy Horse 1.1 Text to Video API 常见问题
Happy Horse 1.1 Text to Video API 是什么?
Happy Horse 1.1 Text to Video 是阿里巴巴研发的文本生成视频模型。它根据文本提示词生成 3–15 秒 720p 或 1080p 电影级高保真视频,具备原生同步音频生成、7 种语言口型对齐以及流畅的物理动作表现能力。基于统一的单流自注意力 Transformer 架构,它在严格遵循提示词细节与多镜头节奏的同时,呈现细腻逼真的动态光影与时空连贯性。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Happy Horse 1.1 Text to Video 支持纯文本生成口型对白的视频吗?
支持。只要在提示词中包含用双引号包裹的对白台词并说明语种,模型在生成视频帧的同时会自动合成符合发音节奏的语音,并让画面人物的嘴形肌肉精确匹配对应发音。
Happy Horse 1.1 Text to Video 支持哪些语言的口型同步?
该模型原生支持英语、普通话、粤语、日语、韩语、德语与法语共 7 种语言的高精度口型同步。在提示词中明确指定台词语言即可引导模型展现地道的发音节奏与面部口型。
如何在 Happy Horse 1.1 Text to Video 提示词中控制多镜头时序?
你可以在提示词中使用明确的秒数范围标注(例如 0-4秒 与 4-8秒)。模型能够识别时序分段指示,依次安排前后动作转换、镜头视角切换与人物台词节奏。
Happy Horse 1.1 Text to Video 单次可以生成多长时间和分辨率?
单次任务支持生成 3 至 15 秒之间的任意整数秒时长,默认预设为 5 秒。画面分辨率提供 720p 与 1080p 两种选项供自由选择。
Happy Horse 1.1 Text to Video 支持哪些画面宽高比?
支持 9 种常用画幅比例:21:9、16:9、4:3、1:1、3:4、4:5、5:4、9:16 与 9:21。在请求参数的 aspect_ratio 字段中传入对应比例即可直接获取对应构图成片。
Happy Horse 1.1 Text to Video 的声音是如何生成的?
声音与视频画面在模型单次前向推理过程中一体化生成,并非后期拼接。在提示词中详细描绘材质碰撞声、天气氛围声、脚步声及配乐风格,即可使环境拟音与动作画面深度吻合。
Happy Horse 1.1 Text to Video 如何计算扣除点数?
计费方式为请求视频时长乘以对应分辨率单价:720p 为每秒 22 点数,1080p 为每秒 28 点数。点数在提交任务时扣除,若生成遇到异常将全额自动返还。









