One continuous four-second shot in a rain-wet night market. A fictional adult courier in an amber raincoat starts a small unbranded red delivery scooter beside a steaming noodle stall and pulls away. The camera tracks low beside the rear wheel from a medium-wide view to a medium view. Keep the courier, raincoat, scooter, stall, and camera direction consistent. Use believable acceleration, restrained tire spray, wet neon reflections, and natural cloth motion. Synchronized audio: one engine start, light rain on the awning, tire hiss on wet pavement, and quiet cooking sizzle. No cuts, no extra people entering frame, no dialogue, no readable text, no logos, no products, no advertising, no watermark.
Seedance 2.0 Mini Text-to-Video API
seedance-2.0-mini/text-to-videoSeedance 2.0 Mini Text-to-Video API 将文本提示词生成 4–15 秒的 480p 或 720p 视频。请求可设置七种画面比例,并可发送 generate_audio、return_last_frame、web_search 和 seed;不接收图片、视频或音频输入。
输入
生成音频
请求模型随视频生成音轨。
高级参数
返回最后一帧
保留视频主结果,并把最后一帧作为额外文件返回。
联网搜索
发送可选的 web_search 布尔字段。
输出
等待运行生成文件会显示在这里
设置输入、选择时长,然后运行异步视频任务。
继续使用
示例
REST API
快速开始
完成认证,提交最小文生视频请求,然后取得异步视频结果。
连接 Vidgo API
创建 API Key,仅保存在服务端,并通过 Bearer Header 发送。
- 接口
- POST
https://api.vidgo.ai/api/generate/submit - 认证
- Authorization: Bearer VIDGO_API_KEY
提交一个生成任务
发送准确模型 ID 与必填 input 字段,成功后立即取得 task_id。
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "seedance-2.0-mini/text-to-video",
"input": {
"prompt": "One continuous four-second shot in a rain-wet night market. A fictional adult courier in an amber raincoat starts a small unbranded red delivery scooter beside a steaming noodle stall and pulls away. The camera tracks low beside the rear wheel from a medium-wide view to a medium view. Keep the courier, raincoat, scooter, stall, and camera direction consistent. Use believable acceleration, restrained tire spray, wet neon reflections, and natural cloth motion. Synchronized audio: one engine start, light rain on the awning, tire hiss on wet pavement, and quiet cooking sizzle. No cuts, no extra people entering frame, no dialogue, no readable text, no logos, no products, no advertising, no watermark.",
"duration": 4,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true,
"return_last_frame": true,
"seed": 24082401
}
}'等待结果
只轮询 not_started 和 running,或通过 callback_url 接收扁平的终态任务对象。
查询状态
GET https://api.vidgo.ai/api/generate/status/5I2XP283UB2BTW3R初始每 2–5 秒查询一次,长任务逐步退避;finished 与 failed 都必须停止。网络超时属于传输失败,failed 是任务终态;callback_url 接收扁平任务对象。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "5I2XP283UB2BTW3R",
"status": "running",
"created_time": "2026-08-24T08:50:43"
}
}{
"code": 200,
"data": {
"task_id": "5I2XP283UB2BTW3R",
"status": "finished",
"created_time": "2026-08-24T08:50:43",
"progress": 100,
"error_message": null,
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/bytedance/seedance-2.0-mini/text-to-video/v1/output.mp4"
}
]
}
}完整可运行示例
示例包含提交、轮询、终态、超时、错误和结果提取。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "seedance-2.0-mini/text-to-video",
"input": {
"prompt": "One continuous four-second shot in a rain-wet night market. A fictional adult courier in an amber raincoat starts a small unbranded red delivery scooter beside a steaming noodle stall and pulls away. The camera tracks low beside the rear wheel from a medium-wide view to a medium view. Keep the courier, raincoat, scooter, stall, and camera direction consistent. Use believable acceleration, restrained tire spray, wet neon reflections, and natural cloth motion. Synchronized audio: one engine start, light rain on the awning, tire hiss on wet pavement, and quiet cooking sizzle. No cuts, no extra people entering frame, no dialogue, no readable text, no logos, no products, no advertising, no watermark.",
"duration": 4,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true,
"return_last_frame": true,
"seed": 24082401
}
}
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')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/5I2XP283UB2BTW3R" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
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 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数
model 与 callback_url 位于顶层,input 只发送下列白名单字段;媒体字段会被拒绝。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | — | 必须为 seedance-2.0-mini/text-to-video。 |
| callback_url | string (URL) | 否 | — | 接收终态任务对象的公开地址。 |
| input | object | 是 | — | 模型输入对象。 |
| input.prompt | string | 是 | — | trim 后 1–20,000 个字符。 |
| input.duration | integer | 是 | — | 4–15 的整数,包括 4 和 15;boolean 和小数无效。 |
| input.resolution | string | 否 | 720p | 480p 或 720p。 |
| input.aspect_ratio | string | 否 | — | auto、21:9、16:9、4:3、1:1、3:4 或 9:16。 |
| input.generate_audio | boolean | 否 | — | 请求生成音频。 |
| input.return_last_frame | boolean | 否 | — | 请求额外最后一帧。 |
| input.web_search | boolean | 否 | — | 可选的 boolean 字段。 |
| input.seed | integer | 否 | — | 公开契约未声明范围。 |
响应字段
提交响应返回任务身份;状态响应补充进度、全部文件或失败信息。
| 字段 | 类型 | 说明 |
|---|---|---|
| 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 | 进度。 |
| data.files[] | array | 全部成功文件。 |
| data.files[].file_url | string | 结果 URL。 |
| data.files[].file_type | string | 视频、图片等类型。 |
| data.files[].watermark_url | string | null | 可用时的水印地址。 |
| data.error_message | string | null | 失败信息。 |
任务生命周期
只轮询非终态。
not_started已接收,等待执行。
running生成中,继续轮询。
finished成功终态,读取全部文件。
failed失败终态,读取错误并停止。
轮询与错误
- 认证401 表示 Bearer Key 缺失或无效。
- 校验400 表示请求不符合契约,应修正点名字段。
- 轮询间隔从 2–5 秒开始,长任务、429 或 5xx 逐步退避。
- 终态finished 或 failed 立即停止,并设置客户端超时。
- 回调顶层 callback_url 接收扁平终态对象,仍可继续使用状态查询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 输入模式 | 纯文本 | 拒绝媒体字段。 |
| 输出 | 视频 + 可选最后一帧 | 异步任务可返回多个文件。 |
| 分辨率 | 480p / 720p | API 默认 720p。 |
| 时长 | 4–15 秒 | 包括 4 和 15 的整数范围。 |
| 画面比例 | Auto + 6 种固定比例 | 共七个允许值。 |
| 计费 | 10 或 24 积分/秒 | 按分辨率和输出秒数。 |
相关模型
Seedance 2.0 Mini Text-to-Video API — 常见问题
Seedance 2.0 Mini Text-to-Video API 是什么?
Seedance 2.0 Mini Text-to-Video API 将文本提示词生成视频。请求成功后返回 task_id;任务完成后,data.files 包含生成视频,并可在 return_last_frame 为 true 且服务返回该文件时包含最后一帧图片。
如何调用 Seedance 2.0 Mini Text-to-Video API?
使用 Bearer Key 向 /api/generate/submit 发送 POST,将模型 ID 设置为 seedance-2.0-mini/text-to-video,并把 prompt、duration 等参数放入 input。取得 task_id 后查询任务状态,或提供 callback_url。
Seedance 2.0 Mini Text-to-Video API 如何计费?
480p 每个输出秒使用 10 积分($0.050),720p 每个输出秒使用 24 积分($0.120)。运行按钮同时显示当前参数对应的积分和美元参考金额。
Seedance 2.0 Mini Text-to-Video API 支持哪些输入?
prompt 接受 trim 后 1–20,000 个字符,duration 接受 4–15 的整数,resolution 接受 480p 或 720p,aspect_ratio 接受七个枚举值;还可发送 generate_audio、return_last_frame、web_search 和整数 seed。
如何获取 Seedance 2.0 Mini Text-to-Video API 的生成结果?
仅在状态为 not_started 或 running 时查询 GET /api/generate/status/{task_id}。状态变为 finished 或 failed 后停止查询;成功文件 URL 位于 data.files[].file_url。
三种 Seedance 2.0 Mini API 应该如何选择?
没有源素材时使用 Seedance 2.0 Mini Text-to-Video API;需要首帧和可选尾帧时使用 Seedance 2.0 Mini Image-to-Video API;需要图片、视频或音频参考时使用 Seedance 2.0 Mini Reference-to-Video API。















