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
bytedance/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",
"callback_url": "https://webhook.site/b3fc9007-e1ec-4df1-97da-fd65c209e5d6",
"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",
"callback_url": "https://webhook.site/b3fc9007-e1ec-4df1-97da-fd65c209e5d6",
"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 文生视频 API 概览
Seedance 2.0 Mini Text-to-Video API 只需要文本提示词,不需要上传源媒体。prompt 可包含主体、环境、动作、镜头、光线和声音说明;任务异步执行,生成文件通过状态查询或 callback_url 返回。
为什么使用 Seedance 2.0 Mini Text-to-Video API?
只提交文本提示词。prompt 用于说明主体、环境、动作、镜头、光线和声音,不需要图片、视频或音频输入。
选择 4–15 秒整数时长。duration 接收 4 到 15 之间的整数,包括 4 和 15。
选择七种画面比例。aspect_ratio 接受 auto、16:9、9:16、1:1、21:9、4:3 和 3:4。
按需返回音频和最后一帧。generate_audio 请求生成音轨,return_last_frame 请求额外返回最后一帧文件。
参数
| 参数 | 要求 | 说明 |
|---|---|---|
| prompt | 必填 | trim 后 1–20,000 个字符的场景描述。 |
| duration | 必填 | 4–15 秒整数;Playground 初始为 5 秒。 |
| resolution | 可选 | API 与 Playground 都以 720p 开始。 默认值 720p480p |
| aspect_ratio | 可选 | Auto 或六种固定画面比例;Playground 初始为 Auto。 auto16:99:161:121:94:33:4 |
| generate_audio | 可选 | boolean。Playground 初始显式发送 true,API 未声明默认值。 |
| return_last_frame | 可选 | 请求额外返回最后一帧;Playground 未开启时省略。 |
| web_search | 可选 | boolean;Playground 未开启时不发送该字段。 |
| seed | 可选 | 整数,公开契约未声明上下限;空值省略。 |
使用方法
定义主体写清主体、环境与必须持续可见的细节。
描述动作用具体动词说明一个主要动作及其发展过程。
单独指挥镜头把主体运动与景别、机位和镜头移动分开写。
补充光线、氛围和声音在提交前明确光线、情绪与所需声音线索。
提交并跟踪运行请求,然后轮询任务 ID 或接收终态回调。
价格
文生视频只按输出时长和分辨率计费。1 积分 = $0.005;generate_audio、return_last_frame、web_search 和 seed 当前不改变费率。
| 计费项 | 费率 | 说明 |
|---|---|---|
| 480p 输出 | 10 积分 / 输出秒 | $0.050/秒;5 秒使用 50 积分,即 $0.250。 |
| 720p 输出 | 24 积分 / 输出秒 | $0.120/秒;5 秒使用 120 积分,即 $0.600。 |
适用场景
文字分镜预览把文字分镜生成 4–15 秒视频,用于制作前确认动作、镜头和构图。
社交媒体比例变体用同一创意生成横屏、方形、竖屏或电影画幅版本。
镜头设置对比分别提交固定机位、横移、推进或环绕等镜头说明,对比生成结果。
带音轨的视频草案在 prompt 中说明对白、音效或环境声,并将 generate_audio 设置为 true。
提示词技巧
- 按主体与环境、动作、镜头、光线、氛围、声音的顺序组织提示词。
- 使用具体动作动词,并把主体运动和镜头移动分开描述。
- 短片只保留一个主动作,避免多个事件竞争注意力。
- 节奏重要时,写出开场、发展和结束动作。
- 先确定交付比例,再描述构图和留白。
注意事项
- Seedance 2.0 Mini Text-to-Video API 不接收图片、视频、音频或参考素材字段。
- duration 必填,Playground 提供的 5 秒只是初始值。
- API 的 resolution 默认为 720p,其他 Playground 初始状态不是 API 默认值。
- 任务为异步执行,只在 not_started 或 running 时继续轮询。
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。


