Seedance 2.5 API
ReachAPI 通过公开模型 ID seedance-2-5 和统一异步视频任务接口提供 ByteDance Seedance 2.5。
- 创建任务:
POST /v1/vids/create - 查询任务:
GET /v1/tasks/{task_id} - 执行方式:异步;轮询任务接口或提供
callback_url - 模型 ID:
seedance-2-5
认证
Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json能力与价格
| 时长 | 分辨率 | 比例 | 输入模式 |
|---|---|---|---|
4 至 30 的整数,或使用 -1 自动选择 | 480p、720p | 21:9、16:9、4:3、1:1、3:4、9:16、adaptive | 文本、图片、视频、音频及纯音频 |
input.content 必填且必须是非空数组。prompt、image_url、video_urls 等旧字段不会被自动转换。
| 视频输入 | 价格 |
|---|---|
input.content 不含 video_url | $10.70 / 100 万输出 token |
input.content 包含 video_url | $6.40 / 100 万输出 token |
计费依据是返回的输出 token,而非视频时长。ReachAPI 将 BytePlus usage.completion_tokens 映射为 usage.output_tokens,成功任务按该值结算。
创建任务
{
"model": "seedance-2-5",
"callback_url": "https://your-domain.com/callback",
"input": {
"content": [
{
"type": "text",
"text": "A cinematic train journey through a mountain valley at sunrise"
}
],
"duration_seconds": 12,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true,
"watermark": false
}
}顶层参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 必须为 seedance-2-5 |
callback_url | string | 否 | 接收任务终态的 HTTPS URL;最长 2048 字符;拒绝内网目标 |
input | object | 是 | 视频生成参数 |
input 参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
content | object 数组 | 是 | 非空的显式多模态输入 |
resolution | string | 是 | 480p 或 720p |
duration_seconds | integer | 否 | 4 至 30,或传 -1 自动选择时长 |
aspect_ratio | string | 条件必填 | 支持的比例之一;首尾帧生成必须为 adaptive |
generate_audio | boolean | 否 | 请求生成音频 |
watermark | boolean | 否 | 向模型传递水印选项 |
return_last_frame | boolean | 否 | 请求模型返回最后一帧图片 |
output_format | string | 否 | mp4 或 mov |
priority | integer | 否 | 0 至 9 的调度优先级 |
safety_identifier | string | 否 | 最长 64 字符的 ASCII 终端用户安全标识 |
Seedance 2.5 不支持 seed、edit_mode 或 extend_mode。编辑和续写应通过参考内容加文本提示词表达。
input.content
| 类型 | Role | 上限 | 说明 |
|---|---|---|---|
text | 无 | 1 | 提示词或编辑指令 |
image_url | first_frame | 1 | 首帧;未指定 role 的图片也按首帧处理 |
image_url | last_frame | 1 | 尾帧;必须同时提供首帧 |
image_url | reference_image | 图片合计 30 | 主体、场景或风格参考 |
video_url | reference_video | 10 | 动作、编辑或续写参考 |
audio_url | reference_audio | 10 | 音频参考;支持纯音频输入 |
URL 分别放在 image_url.url、video_url.url 或 audio_url.url。客户端素材必须是可公开访问的 https:// URL;HTTP、Base64、data: URL、裸 Base64 以及客户端提交的 asset:// 均会被拒绝。
首尾帧不能与 reference_image、reference_video 或 reference_audio 混用。尾帧必须搭配首帧,所有首尾帧请求都必须显式设置 aspect_ratio=adaptive。
请求示例
纯音频输入并输出 MOV
{
"model": "seedance-2-5",
"input": {
"content": [
{
"type": "audio_url",
"role": "reference_audio",
"audio_url": { "url": "https://cdn.example.com/music.mp3" }
}
],
"duration_seconds": 20,
"resolution": "720p",
"aspect_ratio": "adaptive",
"generate_audio": true,
"output_format": "mov",
"priority": 5
}
}参考视频编辑或续写
{
"model": "seedance-2-5",
"input": {
"content": [
{
"type": "text",
"text": "Continue this scene into a rainy night and preserve the camera movement"
},
{
"type": "video_url",
"role": "reference_video",
"video_url": { "url": "https://cdn.example.com/source.mp4" }
}
],
"duration_seconds": 10,
"resolution": "480p",
"aspect_ratio": "16:9"
}
}不要添加 edit_mode 或 extend_mode;操作由内容和提示词共同定义。
响应、轮询与回调
提交响应:
{
"code": 200,
"msg": "",
"status": "queued",
"task_id": "task_xxx",
"data": []
}轮询 GET /v1/tasks/task_xxx,直到 status 为 success 或 failed。
{
"code": 200,
"msg": "",
"status": "success",
"task_id": "task_xxx",
"data": [{ "url": "https://cdn.example.com/generated/video.mov" }],
"usage": {
"input_tokens": 0,
"output_tokens": 102960,
"total_tokens": 102960
},
"cost": { "spend": 1.101672 }
}成功视频结果包含 data[].url。提供 callback_url 后,ReachAPI 会通过 POST 发送相同结构的任务终态响应。
真人素材处理
BytePlus 可能要求真人或隐私肖像参考素材先存入素材库。首次提交返回该类错误时,ReachAPI 会将原始 HTTPS 素材上传至当前 provider 的 Asset Library,在内部改写后重试一次。客户端仍只提交原始 HTTPS URL,不得提交 asset://。
约束与错误
input.content与resolution必填- 时长必须为
4-30或-1;不支持1080p - 最多 1 个文本、30 张图片、10 个视频和 10 个音频
video_url必须使用reference_video;audio_url必须使用reference_audio- 未知字段、不支持的旧字段和无效素材 URL 返回
400 401表示 API Key 无效,402表示余额不足,422表示安全拒绝,429表示限流