Seedance 2.5 Flash Image to Video API
seedance-2.5-flash/image-to-videoSeedance 2.5 Flash Image to Video 将首帧或首尾帧生成 4–30 秒同步音频视频,支持 480p 与 720p。它保留首帧的主体、构图与光线,按提示词加入动作并可在尾帧收束。
输入
拖拽文件、粘贴剪贴板素材,或输入 URL。 JPEG, PNG, or WebP, up to 30 MB
1/1 个素材
拖拽文件、粘贴剪贴板素材,或输入 URL。 JPEG, PNG, or WebP, up to 30 MB
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
提交一个生成任务
使用当前模式的最小有效 payload 提交任务。成功后会立即返回 task_id,无需等待视频生成完成。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "seedance-2.5-flash/image-to-video",
"input": {
"prompt": "Begin from Image 1, push in slowly as the subject turns toward the window, and finish on Image 2.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"image_urls": [
"https://example.com/start-frame.png",
"https://example.com/end-frame.png"
],
"generate_audio": true
}
}
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": "seedance-2.5-flash/image-to-video",
"input": {
"prompt": "Begin from Image 1, push in slowly as the subject turns toward the window, and finish on Image 2.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"image_urls": [
"https://example.com/start-frame.png",
"https://example.com/end-frame.png"
],
"generate_audio": true
}
}
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
doneinput 参数
下表列出 input 对象支持的字段;请求示例还会展示顶层必填字段 model。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| prompt | string | 是 | — | 描述画面的文本提示词。 |
| duration | integer | 是 | — | 4–30 闭区间内的整数。 |
| image_urls | string[] | 是 | — | 1–2 个公开图片地址:首帧,以及可选尾帧。 |
| resolution | string | 否 | 720p | 480p 或 720p。 |
| aspect_ratio | string | 否 | — | auto,画幅跟随首帧。 |
| generate_audio | boolean | 否 | — | 是否生成同步音频;开启或关闭单价相同。 |
响应字段
提交成功后会立即返回任务信息;查询状态时可获取进度、输出文件或失败原因。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务返回码;成功响应兼容 0 或 200。 |
| message | string | 接口返回的提示或错误信息。 |
| data.task_id | string | 用于状态查询路径的任务 ID。 |
| data.status | string | not_started、running、finished 或 failed。 |
| data.created_time | string | 任务创建时间。 |
| data.progress | integer | 任务进度,提供时取值为 0–100。 |
| data.files[] | array | 任务成功后返回的全部输出文件,顺序与接口响应一致。 |
| data.files[].file_url | string | 生成视频的公开地址。 |
| data.files[].file_type | string | 文件类型,例如 video。 |
| data.error_message | string | null | 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 项为尾帧。 |
| 输出 | 视频任务 | 接口返回异步任务 ID,成片包含可选同步音频。 |
| 分辨率 | 480p / 720p | 默认 720p。 |
| 时长 | 4–30 秒 | 闭区间内任意整数秒。 |
| 画幅 | auto | 跟随首帧。 |
| 计费依据 | 输出秒数 | 480p 18.5 积分/秒;720p 41 积分/秒。 |
相关模型
Seedance 2.5 Flash Image to Video API 常见问题
Seedance 2.5 Flash Image to Video API 是什么?
Seedance 2.5 Flash Image to Video 是字节跳动 Seed 团队用于根据图片生成视频的模型。它把首帧或首尾帧转化为 480p 或 720p 的 4–30 秒视频,支持可选同步音频,每秒积分比 Seedance 2.5 低约三分之一。它基于 Seedance 2.5 的音视频生成流程,保留首帧中的主体、构图与光线,同时按提示词加入动作。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Seedance 2.5 Flash Image to Video 支持尾帧吗?
支持。在 image_urls 中传两个地址:条目 1 为首帧,条目 2 为尾帧。视频从第一张图开始、在第二张图结束,适合两个姿态、构图或产品角度之间的过渡。首尾帧的机位和光线保持接近,过渡会更顺畅。
Seedance 2.5 Flash Image to Video 的画幅怎么确定?
画幅跟随首帧。aspect_ratio 传 auto 或省略即可;上传前先把首帧裁成目标比例,例如竖屏用 9:16、横屏用 16:9。
Seedance 2.5 Flash Image to Video 如何保持主体一致?
使用清晰的首帧,并在提示词中写明需要保持的内容,例如面容、发型、服装、产品标签和光线。围绕一个主要动作和一种镜头运动来写;结尾姿态重要时,再加一张尾帧。
Seedance 2.5 Flash Image to Video 每秒消耗多少积分?
480p 每输出秒 18.5 积分($0.0925),720p 每输出秒 41 积分($0.205)。720p 生成 5 秒为 205 积分,添加尾帧和开启音频均按同一单价计费。
Seedance 2.5 Flash Image to Video 能加同步声音吗?
能。将 generate_audio 设为 true,会随动作生成脚步、衣料、室内环境或人声等声音。在提示词中写明需要的声音,设为 false 时输出无声视频,价格相同。
Seedance 2.5 Flash Image to Video 与 Seedance 2.5 Image to Video 有什么区别?
两者使用相同的首尾帧输入,都生成 4–30 秒视频。Flash 输出 480p 或 720p,每秒 18.5 和 41 积分;Seedance 2.5 Image to Video 每秒 28 和 63 积分,并额外提供 1080p。需要 1080p 的镜头更换模型 ID 即可。
什么时候该用 Seedance 2.5 Flash Reference to Video 而不是 Image to Video?
图片用于在整段画面中引导人物或风格时,或者还需要参考视频、参考音频来控制动作和声音时,选择 Seedance 2.5 Flash Reference to Video。视频的第一帧已经确定时,使用 Image to Video。















