Preserve the snow leopard, its exact fur pattern, body proportions and rocky mountain setting from the first frame. The leopard slowly turns only its head toward the camera and holds a calm attentive gaze. A light mountain breeze gently moves its dense fur while a few fine snow particles drift sideways. Its body and all four paws stay planted firmly on the ledge; its long tail rests behind it. Very slow subtle camera push-in, natural wildlife documentary motion, consistent anatomy and lighting, no cuts, no extra animals or objects.
Wan 2.2 Fast Image to Video API
alibaba/wan/v2.2-a14b/image-to-video/turboWan 2.2 Fast Image to Video 将静态参考图像快速转化为支持 480p 与 720p 分辨率的生动流畅视频,提供单张首帧驱动与首尾双帧过渡控制能力。模型能够高度保真输入画面的主体特征、质感纹理与环境光影,并依据文本提示词赋予画面自然连贯的物理动态。
486/800
![Image Urls[0]](https://cdn.vidgo.ai/apis/models/alibaba/wan/v2.2-a14b/image-to-video/turbo/v1/03/start.png)
](https://cdn.vidgo.ai/apis/models/alibaba/wan/v2.2-a14b/image-to-video/turbo/v1/03/end.png)
示例
REST API 参考
快速上手
提交任务后,使用 task_id 查询结果。
第 1 步:配置认证信息
在控制台创建 API Key,并在发起提交请求时附带 Authorization: Bearer <API_KEY> 请求头。
- 提交接口
- POST
https://api.vidgo.ai/api/generate/submit - 认证请求头
- Authorization: Bearer VIDGO_API_KEY
第 2 步:提交生成任务
POST /api/generate/submit: alibaba/wan/v2.2-a14b/image-to-video/turbo
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan/v2.2-a14b/image-to-video/turbo",
"input": {
"prompt": "Close-up shot of an elderly sailor wearing a yellow raincoat, seated on the deck of a catamaran, slowly puffing on a pipe. His cat lies quietly beside him with eyes closed, enjoying the calm. The warm glow of the setting sun bathes the scene, with gentle waves lapping against the hull and a few seabirds circling slowly above. The camera slowly pushes in, capturing this peaceful and harmonious moment.",
"resolution": "480p",
"image_urls": [
"https://cdn.doculator.org/wan-2-2-fast/start-image.jpg"
]
}
}
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"第 3 步:轮询获取生成结果
在状态为 not_started 或 running 时使用 task_id 轮询,到达 finished 或 failed 停止。成功时读取 data.files[].file_url,失败时读取 data.error_message。
状态查询端点
GET https://api.vidgo.ai/api/generate/status/{task_id}使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-example",
"status": "running",
"created_time": "2026-09-24T00:00:00Z"
}
}{
"code": 200,
"data": {
"task_id": "task-example",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://example.com/output.mp4"
}
],
"created_time": "2026-09-23T00:00:00Z"
}
}完整可执行脚本
展开查看包含自动轮询、错误重试与超时保护的端到端调用脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan/v2.2-a14b/image-to-video/turbo",
"input": {
"prompt": "Close-up shot of an elderly sailor wearing a yellow raincoat, seated on the deck of a catamaran, slowly puffing on a pipe. His cat lies quietly beside him with eyes closed, enjoying the calm. The warm glow of the setting sun bathes the scene, with gentle waves lapping against the hull and a few seabirds circling slowly above. The camera slowly pushes in, capturing this peaceful and harmonious moment.",
"resolution": "480p",
"image_urls": [
"https://cdn.doculator.org/wan-2-2-fast/start-image.jpg"
]
}
}
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请求参数(input 对象)
生成参数置于 input 中,model 和可选的 callback_url 置于请求顶层。使用标准 JSON 类型;传入不支持的 input 字段将被拒绝。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| prompt | string | 是 | - | 必填非空字符串,去除首尾空白后最多 800 个 Unicode 字符。 |
| image_urls | string[] | 是 | - | 提供 1–2 个公开 HTTP(S) 图片直链:第 1 张为首帧,第 2 张为可选尾帧。链接必须包含域名,不可包含凭证或空格。 |
| resolution | string | 否 | 480p | 输出分辨率:480p 或 720p。 |
| seed | integer | 否 | - | 可选随机种子,用于复现结果。 |
响应字段(查询状态)
GET /api/generate/status/{task_id} 返回的具体内容:
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | HTTP/业务响应状态码(200 表示成功)。 |
| data.task_id | string | 全局唯一的任务标识。 |
| data.status | string | 任务生命周期状态:not_started、running、finished 或 failed。 |
| data.files | array | 生成完成时输出的资产数组,包含 file_url 和 file_type。 |
| data.error_message | string | null | 当任务状态为 failed 时的错误诊断信息。 |
任务生命周期
客户端应持续轮询状态,直到到达 finished 或 failed 终态:
not_started排队中
running生成中
finished已就绪
failed失败
轮询与错误处理
- 轮询间隔建议建议在提交任务 2-3 秒后开始首次状态查询,之后保持 3 秒左右的间隔,直到任务进入 finished 或 failed 终态。
- 网络异常容错查询状态时遭遇瞬时网络超时或 HTTP 5xx 错误并不代表视频生成失败,继续重试状态查询即可。
- 配置 Webhook 回调可在提交请求的顶层传入 callback_url,生成任务在完成或失败时会自动向该地址推送最新状态,减少主动轮询开销。
规格说明
| 规格项 | 取值 | 说明 |
|---|---|---|
| 模型 | alibaba/wan/v2.2-a14b/image-to-video/turbo | |
| 分辨率 | 480p / 720p | 默认 480p |
| 价格 | 480p: $0.030 · 720p: $0.060 | 6 / 12 积分,每次生成 |
相关模型
Wan 2.2 Fast Image to Video API 常见问题
什么是 Wan 2.2 Fast Image to Video API?
Wan 2.2 Fast Image to Video 是阿里巴巴推出的图生视频模型。它能将静态参考图像快速转化为支持 480p 与 720p 分辨率的高清流畅视频,提供单张首帧驱动与首尾双帧平滑过渡控制能力。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Wan 2.2 Fast Image to Video 需要传入怎样的图片?
必须在 image_urls 数组中至少提供 1 张公开可访问的 HTTP(S) 图片直链作为视频首帧;此外还可额外传入第 2 张图片作为可选尾帧。在在线体验区中可直接从本地上传图片,系统会自动将其转为符合要求的可用直链。
Wan 2.2 Fast Image to Video 的可选尾帧有什么作用,是否额外收费?
在 image_urls 数组中传入第 2 张图片链接可将其设定为视频的结束帧,模型将自动计算两张图片之间的动作与镜头平滑过渡插值。添加可选尾帧不会增加任何生成费用,依旧按所选分辨率标准扣费。
Wan 2.2 Fast Image to Video 支持哪些输出分辨率?
Wan 2.2 Fast Image to Video 支持 480p(默认)与 720p 两种清晰度规格。480p 档位响应更快且成本极低,适合大批量创意发散与原型检验;720p 档位画面细腻度与纹理细节更丰富,适合直接用于成品内容交付。
Wan 2.2 Fast Image to Video 的视频画面比例是如何确定的?
生成的视频将自动继承输入首帧图片的原生画幅长宽比。该端点不支持传入自定义 aspect_ratio 参数,以确保输入素材构图不会发生意外裁切或变形拉伸。
Wan 2.2 Fast Image to Video 中提示词的作用和长度限制是什么?
prompt 参数为必填项,在去除首尾空格后最多允许输入 800 个 Unicode 字符。提示词用于引导参考图中主体的运动轨迹、动作幅度、神态演变以及摄像机推拉摇移等运镜方向。
Wan 2.2 Fast Image to Video 的调用费用是多少?
按次计费,费率因分辨率档位而异:480p 单次生成收取 6 积分($0.030),720p 单次生成收取 12 积分($0.060),无论是否携带可选尾帧均同价。提交时扣费,若任务因系统异常最终 failed,积分将自动原路全额退还。
如何通过 API 获取 Wan 2.2 Fast Image to Video 的生成视频?
向 POST /api/generate/submit 提交请求后,读取返回的 task_id。状态为 not_started 或 running 时,使用 GET /api/generate/status/{task_id} 继续轮询;到达 finished 或 failed 时停止。成功时从 data.files[].file_url 获取视频链接,失败时读取 data.error_message。















