API ReferenceVideo APIsSeedance
Seedance 2 API
ReachAPI 当前通过公开模型 ID seedance-2 与 seedance-2-fast 对外提供 Seedance 2 系列能力。
本文说明如何在 ReachAPI 中调用 Seedance 2 模型,包括请求参数、约束和示例。
重要说明:
- 提交任务:
POST /v1/vids/create - 查询任务:
GET /v1/tasks/{task_id} - 模型 ID:
seedance-2、seedance-2-fast - 执行方式:异步任务
- 所有请求现在都必须显式传
input.content
1. 接口概览
- 请求方法:
POST - 请求路径:
/v1/vids/create - Content-Type:
application/json - 结果获取方式:
- 提交时先返回任务受理结果
- 最终结果通过轮询
/v1/tasks/{task_id}或callback_url获取
2. 认证与请求头
请求头示例:
Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json3. 模型能力摘要
| 模型 | 时长 | 分辨率 | 比例 | input.content | 说明 |
|---|---|---|---|---|---|
seedance-2 | 4-15s | 480p、720p、1080p | 21:9、16:9、4:3、1:1、3:4、9:16、adaptive | 必填 | 支持文本、图片、视频、音频参考,以及编辑、续写 |
seedance-2-fast | 4-15s | 480p、720p | 21:9、16:9、4:3、1:1、3:4、9:16、adaptive | 必填 | 与 seedance-2 字段一致,但当前不支持 1080p |
说明:
- 支持
duration_seconds = -1,由模型自动选择时长
计费与用量
Seedance 视频任务采用返回 token 用量计费,而非按时长计费。预估价格 = token 单价 × token 消耗量。最终账单使用 ReachAPI 任务响应中的 usage.output_tokens,该值由 BytePlus usage.completion_tokens 映射而来。
| 模型 | 视频输入 | 分辨率 | Token 单价 |
|---|---|---|---|
seedance-2 | 无 | 480p / 720p | $7.00 / 100 万 token |
seedance-2 | 无 | 1080p | $7.70 / 100 万 token |
seedance-2 | 有 | 480p / 720p | $4.30 / 100 万 token |
seedance-2 | 有 | 1080p | $4.70 / 100 万 token |
seedance-2-fast | 无 | 480p / 720p | $5.60 / 100 万 token |
seedance-2-fast | 有 | 480p / 720p | $3.30 / 100 万 token |
seedance-2-fast | 任意 | 1080p | 不支持 |
4. 提交任务
请求体示例:
{
"model": "seedance-2",
"callback_url": "https://your-domain.com/callback",
"input": {
"content": [
{
"type": "text",
"text": "A cinematic drone shot passing over a coastline at sunrise"
}
],
"duration_seconds": 6,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}4.1 顶层参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 只能是 seedance-2 或 seedance-2-fast |
callback_url | string | 否 | 任务终态回调地址。仅支持 https,最大长度 2048,禁止本地或内网目标 |
input | object | 是 | 视频生成参数 |
4.2 input 参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
content | array<object> | 是 | 显式多模态输入,必须为非空数组 |
duration_seconds | integer | 否 | 输出时长。可传 4-15,或传 -1 由模型自动选择 |
resolution | string | 是 | 输出分辨率。seedance-2 支持 480p、720p、1080p;seedance-2-fast 支持 480p、720p |
aspect_ratio | string | 否 | 输出比例。可选值:21:9、16:9、4:3、1:1、3:4、9:16、adaptive |
generate_audio | boolean | 否 | 是否请求生成音频 |
seed | integer | 否 | 随机种子,范围 -1 到 4294967295;传 -1 表示随机 |
safety_identifier | string | 否 | 终端用户安全标识。必须是最长 64 字符的 ASCII 字符串 |
watermark | boolean | 否 | 是否传递水印偏好 |
return_last_frame | boolean | 否 | 是否请求返回最后一帧图片 |
edit_mode | string | 否 | 用于控制支持场景下的编辑行为 |
extend_mode | string | 否 | 用于控制支持场景下的续写行为 |
5. input.content 结构
支持的 type:
textimage_urlvideo_urlaudio_url
支持的 role:
first_framelast_framereference_imagereference_videoreference_audio
字段说明:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
content[].type | string | 是 | 只能是 text、image_url、video_url、audio_url |
content[].role | string | 否 | 若传入,必须是上面列出的角色之一;非文本内容建议显式传入 |
content[].text | string | type = text 时必填 | 文本内容 |
content[].image_url.url | string | type = image_url 时必填 | 图片 URL 或已上传的素材 ID |
content[].video_url.url | string | type = video_url 时必填 | 视频 URL 或已上传的素材 ID;当前不支持视频 Base64 |
content[].audio_url.url | string | type = audio_url 时必填 | 音频 URL 或已上传的素材 ID |
约束:
content至少要有 1 个元素- 最多 9 张图片
- 最多 3 个视频
- 最多 3 个音频
- 支持
text与audio同时出现,但必须同时提供至少 1 个reference_image或reference_video - 不支持纯
audio输入,也不支持只有text + audio - 不支持把
first_frame/last_frame和reference_image/reference_video/reference_audio混在同一个请求里
支持的 Seedance 2 输入组合:
texttext可选 +image_urltext可选 +video_urltext可选 +image_url+audio_urltext可选 +image_url+video_urltext可选 +video_url+audio_urltext可选 +image_url+video_url+audio_url
6. 不再支持的旧字段
下面这些字段现在会直接返回 400:
input.promptinput.image_urlinput.image_urlsinput.last_image_urlinput.video_urlsinput.audio_urlsinput.negative_promptinput.parametersinput.instancesinput.service_tierinput.execution_expires_afterinput.framesinput.camera_fixedinput.draftinput.content[].draft_task- 任何未文档化的自定义字段
7. 请求示例
7.1 文生视频
curl -X POST "https://direct.reachapi.ai/v1/vids/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2",
"input": {
"content": [
{
"type": "text",
"text": "A stylized travel film scene with dynamic camera movement"
}
],
"duration_seconds": 8,
"resolution": "1080p",
"aspect_ratio": "adaptive",
"watermark": false
}
}'7.2 显式多模态参考输入
curl -X POST "https://direct.reachapi.ai/v1/vids/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2",
"input": {
"content": [
{
"type": "text",
"text": "A stylized travel film scene with dynamic camera movement"
},
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://cdn.example.com/scene-start.png"
}
},
{
"type": "video_url",
"role": "reference_video",
"video_url": {
"url": "https://cdn.example.com/reference-motion.mp4"
}
}
],
"duration_seconds": 8,
"resolution": "1080p",
"aspect_ratio": "adaptive",
"watermark": false
}
}'7.3 参考视频续写
curl -X POST "https://direct.reachapi.ai/v1/vids/create" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-fast",
"input": {
"content": [
{
"type": "text",
"text": "Extend this clip into a faster action sequence"
},
{
"type": "video_url",
"role": "reference_video",
"video_url": {
"url": "https://cdn.example.com/reference-1.mp4"
}
}
],
"duration_seconds": 6,
"resolution": "480p",
"aspect_ratio": "16:9",
"extend_mode": "continue"
}
}'8. 提交响应
示例响应:
{
"code": 200,
"msg": "",
"status": "queued",
"task_id": "task_xxx",
"data": []
}9. 查询任务状态
请求示例:
curl -X GET "https://direct.reachapi.ai/v1/tasks/task_xxx" \
-H "Authorization: Bearer YOUR_REACH_API_KEY"成功响应示例:
{
"code": 200,
"msg": "",
"status": "success",
"task_id": "task_xxx",
"data": [
{
"url": "https://cdn.example.com/generated/video-1.mp4"
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 102960,
"total_tokens": 102960
},
"cost": {
"spend": 0.12
}
}说明:
data为视频结果数组- ReachAPI 对成功视频结果至少保证返回
data[].url
10. 回调说明
如果提交任务时传了 callback_url,任务进入终态后,网关会向该地址发送 POST 请求。回调 body 与任务查询响应一致。
11. 约束与说明
input.content为必填resolution为必填duration_seconds必须为-1或位于4-15范围内seedance-2-fast当前不支持1080paspect_ratio支持adaptive- 输入素材值不能为空;使用 URL 时必须保证服务端可访问