Keep the same single raccoon, face mask markings, empty shallow steel bowl and abandoned brick kiln from the reference. In one continuous locked low-angle shot, the raccoon leans forward and gently nudges the near rim of the bowl once with one front paw. The bowl rotates and wobbles a half turn in place on the dusty brick floor with a short metallic clink. The raccoon immediately withdraws the paw and watches the bowl settle. No extra paws, no other animals, no bowl deformation or teleporting. Audio: paw scuff, one metallic clink synchronized with contact and a tiny ringing decay, quiet kiln room tone. No speech or music. One continuous five-second shot. No cuts, subtitles, captions, visible writing, logos, advertising or watermarks.
Wan 2.5 Image to Video API
alibaba/wan-2.5/image-to-videoWan 2.5 Image to Video 将静态图片转为带同步音频的短片,支持自然动作与最高 1080p 画质。它以首帧主体和构图为依据,通过提示词引导人物动作与镜头运动。
拖拽文件、粘贴剪贴板素材,或输入 URL。 上传一张 JPG、JPEG、PNG 或 WebP 图片作为首帧,大小不超过 10 MB;也可填写可公开访问的 HTTP(S) 图片链接。
1/1 个素材
示例
开发接入
快速开始
通过统一生成接口提交请求,再使用任务编号查询视频。示例可切换为 cURL、JavaScript 或 Python。
配置访问凭证
在服务端配置 VIDGO_API_KEY,并通过 Authorization 请求头传递 Bearer 凭证。
- 提交地址
- POST
https://api.vidgo.ai/api/generate/submit - 请求鉴权
- Authorization: Bearer VIDGO_API_KEY
提交生成请求
填写 model 与 input,并向生成接口发送 POST 请求;成功后保存返回的 task_id。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-2.5/image-to-video",
"input": {
"prompt": "镜头缓慢向主体推进,保持画面中的原有光线,背景细节轻微移动,配合轻柔的环境声。",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/wan-2.5/image-to-video/v1/01/input.png"
],
"resolution": "720p",
"duration": 5
}
}
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 发送 GET 请求,等待状态变为 finished 或 failed。
任务查询
GET https://api.vidgo.ai/api/generate/status/{task_id}将地址中的 {task_id} 替换为提交响应中的编号,使用同一 Bearer 凭证查询。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-wan25-example",
"status": "not_started",
"created_time": "2026-09-27T00:00:00Z"
}
}{
"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
}
}读取视频文件
完成后读取 data.files 中的视频链接;失败时读取 data.error_message 并检查请求。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-2.5/image-to-video",
"input": {
"prompt": "镜头缓慢向主体推进,保持画面中的原有光线,背景细节轻微移动,配合轻柔的环境声。",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/wan-2.5/image-to-video/v1/01/input.png"
],
"resolution": "720p",
"duration": 5
}
}
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 对象,model 使用当前页面对应的模型标识。
| 字段 | 类型 | 必填 | 默认值 | 用途与取值 |
|---|---|---|---|---|
| prompt | string | 是 | — | 填写 1–1500 个字符,重点描述图片中的主体如何运动、镜头如何移动,以及需要的声音。 |
| image_urls | array<string> | 是 | — | 提供恰好一个可公开访问的 HTTP(S) 图片链接,以该图片作为视频首帧。 |
| resolution | string | 否 | 720p | 选择 480p、720p 或 1080p,默认 720p。费用随清晰度更新。 |
| duration | integer | 否 | 5 | 选择 5 或 10,单位为秒;默认 5。费用随时长更新。 |
| audio | string | 否 | — | 可选,填入可公开访问的音频文件链接,为视频提供配音或音乐;留空时根据画面生成匹配的声音。 |
| negative_prompt | string | 否 | — | 可选,写出希望排除的画面元素,例如模糊、文字或多余人物。 |
| seed | integer | 否 | — | 可选,填写整数以记录随机种子,便于对照提示词与生成设置。 |
响应字段
提交响应提供任务编号,状态查询响应提供执行状态与视频文件。
| 字段 | 类型 | 用途与取值 |
|---|---|---|
| code | integer | 业务结果码;0 或 200 表示本次请求成功。 |
| data.task_id | string | 本次生成任务的编号,用于后续状态查询。 |
| data.status | string | 任务状态:not_started、running、finished 或 failed。 |
| data.files | array<object> | 完成后的文件列表;读取 file_type 为 video 的条目及其 file_url。 |
| data.error_message | string | null | 任务失败时的错误说明,可据此检查素材或调整请求。 |
任务生命周期
保存提交后获得的 task_id,通过同一编号跟踪任务直至完成或失败。
not_started任务已创建,等待开始处理。
running任务正在处理,继续查询同一任务。
finished任务已完成,从 files 读取视频链接。
failed任务已失败,读取 error_message 并检查输入。
查询与错误处理
- 继续查询同一任务获得 task_id 后,用它查询执行进度;查询遇到网络错误时,重试该任务的状态请求。
- 按字段检查请求校验失败时核对必填字段、类型和枚举;图片链接与音频链接应可公开访问。
- 核对完成响应状态为 finished 时读取视频文件;若缺少 file_url,保留 task_id 和返回数据以便排查。
模型规格
| 规格项 | 取值 | 说明 |
|---|---|---|
| 输入方式 | 单张首帧图片与文本 | 图片建立画面起点,提示词引导主体动作和镜头。 |
| 视频时长 | 5 秒 / 10 秒 | 用 duration 选择单个短片的长度,默认 5 秒。 |
| 输出清晰度 | 480p / 720p / 1080p | 通过 resolution 选择,默认 720p。 |
| 音频方式 | 同步生成 / 自定义音频 | 随画面生成匹配声音,或通过 audio 提供可公开访问的音频文件链接。 |
相关模型
Wan 2.5 Image to Video API 常见问题
Wan 2.5 Image to Video API 是什么?
Wan 2.5 Image to Video 是阿里巴巴通义团队用于将静态图片生成视频的模型。它结合一张首帧与动作提示词生成 5 秒或 10 秒短片,支持同步音频、镜头运动与最高 1080p 画质。它以首帧图像作为主体与构图依据,通过文字引导后续动作,让原有画面发展为有声场景。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Wan 2.5 Image to Video 如何延续首帧主体?
模型以首帧中的人物或物体作为画面起点,再根据提示词生成运动。选择主体清晰、轮廓完整的图片,并写清面部朝向、服饰或产品特征,以及接下来要发生的动作。
Wan 2.5 Image to Video 能生成同步音频吗?
可以,模型在生成动态画面时一同生成匹配的声音。提示词中可加入风声、脚步或背景音乐等线索,让图片展开的场景有相应的听觉氛围。
Wan 2.5 Image to Video 如何使用自定义音频?
在 Audio 中填写可公开访问的音频文件链接,为视频提供现成配音或音乐。动作提示词应与录音内容配合,例如描述说话人物的动作与镜头方向。
Wan 2.5 Image to Video 适合什么首帧素材?
使用一张主体清晰的人像、产品照片或插画。体验区可上传大小不超过 10 MB 的 JPG、JPEG、PNG 或 WebP 图片,也可添加可公开访问的 HTTP(S) 图片链接。
Wan 2.5 Image to Video 如何描写动作?
围绕首帧已有主体,写出一个主要动作,再交代方向、幅度和镜头运动。例如“人物缓慢转头看向镜头,镜头保持固定”,或“镜头沿产品侧面缓慢推进”。
Wan 2.5 Image to Video 能输出 1080p 吗?
可以,将 Resolution 设为 1080p;也可选择 480p 或 720p,默认值为 720p。先按展示需要选好首帧构图,再确定输出清晰度,费用会随配置更新。
Wan 2.5 Image to Video 能生成 10 秒短片吗?
可以,将 Duration 设为 10;也可选择默认的 5 秒。根据动作需要的展开时间选择长度,例如短促转头用较短片段,缓慢镜头移动可留出更长时间。















