Begin on the first frame and finish on the last. One continuous 5-second shot: the garden gnome leans, tips, and launches from the pond rim, arcing through the air until it matches the mid-air crash into the koi pond. Preserve the same gnome, pond, koi, plants, and late-afternoon light. Slight handheld follow, no cuts. Native audio: stone scrape, wind whoosh, water slap, startled koi splash. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.
Wan 3.0 Prime Image-to-Video API
alibaba/wan-3.0-prime/image-to-videoWan 3.0 Prime(Image-to-Video)将首帧图片与文本提示词转化为最长 30 秒的连续视频,支持可选尾帧引导、原生音画同步,以及最高 1080p 输出。它把源图的主体、构图与风格带入动态,同时加入动作、运镜与声音。
输入
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/1 个素材
拖拽文件、粘贴剪贴板素材,或输入 URL。
1/1 个素材
输出
已就绪继续使用
示例
REST API
快速开始
完成鉴权、提交合法 input,再用 task_id 取回视频。
连接 Vidgo API
创建 API Key,仅保存在服务端,并通过 Authorization: Bearer VIDGO_API_KEY 发送。
- 接口
- POST
https://api.vidgo.ai/api/generate/submit - 鉴权
- Authorization: Bearer VIDGO_API_KEY
提交一次生成任务
使用本工作流最小合法请求体提交。成功提交会立即返回 task_id,无需等待视频完成。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-3.0-prime/image-to-video",
"input": {
"prompt": "Begin on the first frame and finish on the last. One continuous 5-second shot: the garden gnome leans, tips, and launches from the pond rim, arcing through the air until it matches the mid-air crash into the koi pond. Preserve the same gnome, pond, koi, plants, and late-afternoon light. Slight handheld follow, no cuts. Native audio: stone scrape, wind whoosh, water slap, startled koi splash. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "adaptive",
"audio": true,
"enable_safety_checker": true,
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/wan-3.0-prime/image-to-video/v1/01/input-start-frame.webp",
"https://cdn.vidgo.ai/apis/models/alibaba/wan-3.0-prime/image-to-video/v1/01/input-end-frame.webp"
]
}
}
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。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "running",
"created_time": "2026-08-22T10: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
}
}完整可运行示例
展开查看完整脚本,包含 HTTP 与业务码检查、task_id 校验、轮询、终态处理与超时边界。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-3.0-prime/image-to-video",
"input": {
"prompt": "Begin on the first frame and finish on the last. One continuous 5-second shot: the garden gnome leans, tips, and launches from the pond rim, arcing through the air until it matches the mid-air crash into the koi pond. Preserve the same gnome, pond, koi, plants, and late-afternoon light. Slight handheld follow, no cuts. Native audio: stone scrape, wind whoosh, water slap, startled koi splash. No logos, no readable text, no products, no packaging, no prices, no CTA, no advertising, no watermark, no brand marks.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "adaptive",
"audio": true,
"enable_safety_checker": true,
"image_urls": [
"https://cdn.vidgo.ai/apis/models/alibaba/wan-3.0-prime/image-to-video/v1/01/input-start-frame.webp",
"https://cdn.vidgo.ai/apis/models/alibaba/wan-3.0-prime/image-to-video/v1/01/input-end-frame.webp"
]
}
}
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 字段。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| image_urls | string[] | 是 | — | 1–2 个公开图片 URL,顺序为 Start、可选 End。 |
| prompt | string | 否 | — | 可选;提供时去除首尾空白后 1–20,000 字符。 |
| duration | integer | 否 | 5 | 整数,范围 2–30(含端点)。 |
| resolution | string | 否 | 720p | 480p、720p 或 1080p。 |
| aspect_ratio | string | 否 | adaptive | adaptive、16:9、4:3、1:1、3:4 或 9:16。 |
| audio | boolean | 否 | true | 是否请求音轨;不影响积分费率。 |
| seed | integer | 否 | — | 可选整数,范围 0–2147483647。 |
| enable_safety_checker | boolean | 否 | true | 是否启用安全检查。 |
响应字段
提交后立即返回任务标识。状态响应会补充进度、全部输出文件或失败信息。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务结果码;成功响应为 0 或 200。 |
| message | string | 可读消息或错误说明(如有)。 |
| data.task_id | string | 用于状态查询路径的任务 ID。 |
| data.status | string | not_started、running、finished 或 failed。 |
| data.created_time | string | 任务创建时间(date-time)。 |
| data.progress | integer | 提供方返回的进度,范围 0–100。 |
| data.files[] | array | 成功任务的全部输出文件,按响应顺序排列。 |
| data.files[].file_url | string | 生成视频的公开 URL。 |
| data.files[].file_type | string | 文件类型,例如 video。 |
| data.error_message | string | null | status 为 failed 时的失败详情。 |
任务生命周期
将 not_started 与 running 视为非终态。finished 与 failed 为终态;任一出现后应停止轮询。
not_started任务已受理,等待开始执行。
running正在生成中。请继续使用同一 task_id 轮询。
finished生成成功。请从 data.files[].file_url 读取全部视频地址。
failed生成失败。请读取 data.error_message 并停止轮询。
轮询与错误处理
- 鉴权返回 401 表示 Bearer API Key 缺失或无效。请先修正后再重试。
- 参数校验返回 400 表示字段无效、媒体键不受支持或积分不足。请修正请求后再提交。
- 网络与超时传输失败与任务 failed 不同。请在有限超时内重试状态查询,再判定任务失败。
- 轮询间隔建议从约每 2 秒开始,对长任务逐步加大间隔。
- 终态仅在 not_started 或 running 时继续轮询;遇到 finished 或 failed 立即停止。
- 回调选项可在请求顶层提供 callback_url 接收最终扁平任务对象;若投递失败仍可继续轮询。
接口规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 图片 + 可选文本 | image_urls 需 1–2 张图;prompt 可选,用于补充动作方向。 |
| 输出 | 视频任务 | 接口返回异步任务 ID。 |
| 分辨率 | 480p / 720p / 1080p | 省略时 resolution 默认为 720p。 |
| 时长 | 2–30 秒 | 区间内每个整数均有效;默认 5。 |
| 画面比例 | Adaptive + 5 种固定比例 | adaptive、16:9、4:3、1:1、3:4 或 9:16。 |
| 计费基础 | 输入视频总秒数 + 输出秒数 | 480p 为 13.6 积分/秒;720p 为 28 积分/秒;1080p 为 56 积分/秒。 |
相关模型
Wan 3.0 Prime Image-to-Video API — 常见问题
Wan 3.0 Prime Image-to-Video API 是什么?
Wan 3.0 Prime Image-to-Video 是阿里通义实验室研发的旗舰级图像生成视频模型。它以静态首帧图片为视觉起点并支持可选尾帧图片,生成最长 30 秒、最高 1080p 分辨率、包含高保真原生同步音频的连续视频。基于强化的时空扩散与运动建模架构,它在严格锁定原图主体身份、服装纹理与环境光照的同时,赋予画面平滑自然的动作演绎。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Wan 3.0 Prime 图生视频能否在运动中完全锁定人物身份?
能。模型深度锚定首帧中人物的五官结构、发型与服装材质,并在长达 30 秒的连续动态中保持特征稳定。在提示词中补充具体的面部神态与动作方向,能让角色在大幅度动态中依然保持高辨识度。
Wan 3.0 Prime 图生视频支持首尾双帧平滑过渡吗?
支持。在 image_urls 数组中传入首帧和尾帧两张图片,模型会自动解析两帧之间的构图、光影与姿态差异,在指定时长内渲染出自然平滑的时空转场或动作演进,实现精准的定点镜头衔接。
Wan 3.0 Prime 图生视频如何根据画面自动匹配电影级音效?
当 audio 保持开启时,模型会自动分析首帧画面的视觉环境(如森林、引擎舱、雨夜)及提示词指示的动作行为,在去噪过程中同步合成真实的环境底噪与动作撞击声,无需额外准备音频文件。
Wan 3.0 Prime 图生视频上传的首帧图片有什么要求?
支持 JPEG、PNG、BMP 和 WebP 格式,单张图片大小最大支持 20MB。建议选用构图明确、主体对焦锐利且光照充足的高清素材,以利于模型充分捕捉微观材质并展开动态渲染。
Wan 3.0 Prime 图生视频能把静态构图转变为 30 秒大动作吗?
可以。模型支持在 2 到 30 秒内让静帧逐步演绎为大幅度连贯动态。编写提示词时建议描述渐进式的动作演变(例如“人物缓缓起身,走向窗台并推开窗户”),使长镜头运动自然连贯。
已有静止首帧时应该选 Wan 3.0 Prime 图生还是参考生视频?
如果成片的开场镜头必须与所持图片在像素级构图上严密对齐,应选择图生视频端点;如果仅需要参考图片中角色的长相或衣服,而生成视频需要全新的机位、构图和动作起步,则应选择参考生视频端点。















