Begin exactly from Image 1 and finish on Image 2. In one continuous five-second shot, the pianist presses three gentle notes, lets both hands rise a few centimeters from the keys, then turns his head and shoulders toward the window as a light breeze moves the curtain. Use one slow, stable push-in only. Preserve the same face, hair, green sweater, seated position, piano, room layout, camera axis, and morning light throughout. Keep both hands anatomically natural and settle cleanly into the final pose without morphing. Synchronized audio: three soft piano notes, faint curtain rustle, and quiet room tone. No cuts, no extra person, no dialogue, no readable text, no logo, no product placement, no advertising, no watermark.
Seedance 2.5 Image-to-Video API
seedance-2.5/image-to-videoSeedance 2.5(Image-to-Video)可根据参考图片和提示词生成最长 30 秒的音画同步视频,并控制运镜、光线、节奏和声音。模型会尽量延续原图的主体、构图和视觉风格,同时加入动作、对白、音乐和音效。
输入
拖拽文件、粘贴剪贴板素材,或输入 URL。 JPEG, PNG, or WebP, up to 30 MB
拖拽文件、粘贴剪贴板素材,或输入 URL。 JPEG, PNG, or WebP, up to 30 MB
输出
等待运行生成的视频会显示在这里
设置必填输入、分辨率和时长,然后运行任务。
继续使用
示例
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/image-to-video",
"input": {
"prompt": "The camera pushes in as the subject turns toward the window light.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"generate_audio": true,
"image_urls": [
"https://example.com/start-frame.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"等待结果
使用 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/image-to-video",
"input": {
"prompt": "The camera pushes in as the subject turns toward the window light.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "auto",
"generate_audio": true,
"image_urls": [
"https://example.com/start-frame.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
doneinput 参数
下表列出 input 对象支持的字段;请求示例还会展示顶层必填字段 model。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| prompt | string | 是 | — | 去除首尾空格后为 1–20,000 个字符。 |
| duration | integer | 是 | — | 闭区间 4–30 内的整数。 |
| resolution | string | 是 | — | 显式发送 480p、720p 或 1080p。 |
| aspect_ratio | string | 否 | — | 提供时必须为 auto。 |
| generate_audio | boolean | 否 | — | 是否请求生成音轨;体验区始终显式发送 true 或 false。 |
| image_urls | string[] | 是 | — | 第一项是必填首帧,第二项是可选尾帧。保持顺序,且使用公开可直接下载的 URL。 |
响应字段
提交成功后会立即返回任务信息;查询状态时可获取进度、输出文件或失败原因。
| 字段 | 类型 | 说明 |
|---|---|---|
| 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,可接收最终任务对象;回调投递失败时仍可通过轮询查询结果。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 1–2 帧 | 第一张是首帧,第二张是可选尾帧。 |
| 输出 | 视频任务 | 提交后返回异步任务 ID。 |
| 分辨率 | 480p / 720p / 1080p | resolution 必填且应显式发送。 |
| 时长 | 4–30 秒 | 支持 4 至 30 之间的任意整数秒数。 |
| 画面比例 | 仅 auto | 此工作流使用 auto 画面比例。 |
| 计费依据 | 输出秒数 | 480p 为 28 积分/秒,720p 为 63 积分/秒,1080p 为 114 积分/秒。 |
相关模型
Seedance 2.5 图生视频 API — 常见问题
Seedance 2.5 Image-to-Video API 是什么?
Seedance 2.5 由 ByteDance Seed 开发。Image-to-Video API 根据一张必填首帧和提示词异步生成视频。你还可以添加尾帧来引导结尾,并选择是否同步生成音频。
如何调用 Seedance 2.5 Image-to-Video API?
使用 Bearer API Key 向 /api/generate/submit 发起 POST 请求,将 model 设为 seedance-2.5/image-to-video,并把生成参数放入 input。提交成功后会立即返回 task_id;API 标签页和完整文档中提供了可运行示例。
Seedance 2.5 Image-to-Video API 如何计费?
480p 为 28 积分/输出秒,720p 为 63 积分/输出秒,1080p 为 114 积分/输出秒。例如 5 秒 480p 为 140 积分($0.700),5 秒 720p 为 315 积分($1.58),5 秒 1080p 为 570 积分($2.85)。
Seedance 2.5 Image-to-Video API 接受哪些输入?
在 input 中,image_urls 必须先放首帧 URL,随后可放一个尾帧 URL,数组总数为 1–2 个且顺序不可改变;aspect_ratio 只能为 auto。
如何获取生成的视频?
使用 task_id 轮询 GET /api/generate/status/{task_id}。状态为 finished 时从 data.files[].file_url 读取视频地址;状态为 failed 时停止轮询并读取错误信息。也可以通过 callback_url 接收最终结果。
应该选择哪个 Seedance 2.5 端点?
需要由现有画面定义镜头起点时选择 Image-to-Video;只从文字开始时选择 Text-to-Video;不同素材需要分别承担外观、动作、镜头或声音角色时选择 Reference-to-Video。















