Seedance 全系列深度参数: 首尾帧 / 参考视频 / 参考图 / 音频生成 / Draft 模式 / Seed 复现
POST /v1/videos/generations
Auth: {'type': 'bearer', 'prefix': 'sk-', 'description': 'API Key, 使用 `Authorization: Bearer sk-xxx` 鉴权'}
## Seedance 系列完整参数手册 字节 Seedance 视频生成 — **BytePlus 原生用法**, 跟官方文档 100% 一致. > ✦ **协议透明**: 我们的 endpoint 直接 BytePlus 原生 body 透传 + response 原样返客户, 0 字段魔改 / 0 协议转换. 字段语义 / 默认值 / 错误码 全部参考 [BytePlus 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680). ## 模型矩阵 视频时长**统一支持 4-15 秒**, 各模型实际上限略有不同 (超出上游 400): | 模型 | 典型场景 | 分辨率 | 音频 | Draft | V2V | |---|---|---|---|---|---| | `dreamina-seedance-2-0-260128` | 顶级质量 + 视频续写 | 480 / 720 / 1080p | ✅ | ❌ | ✅ | | `dreamina-seedance-2-0-fast-260128` | 快速出片 | 480 / 720p | ✅ | ❌ | ❌ | | `dreamina-seedance-2-0-mini-260615` | 轻量经济 | 480 / 720p | ✅ | ❌ | ✅ | | `seedance-1-5-pro-251215` | Draft 预览+精修 | 480 / 720 / 1080p | ✅ | ✅ | ❌ | | `seedance-1-0-pro-250528` | 旗舰平衡 | 480 / 720 / 1080p | ❌ | ❌ | ❌ | | `seedance-1-0-pro-fast-251015` | 经济快速 | 480 / 720p | ❌ | ❌ | ❌ | 具体每个模型的 duration 上限 / 支持的 ratio / 音频码率参数见 [BytePlus 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680). ## 输入方式 — content[] 数组 BytePlus 原生 `content` 数组支持 5 种 block type, 灵活组合实现 T2V / I2V / V2V / A2V / Draft: ```json "content": [ { "type": "text", "text": "一只猫在海边奔跑, 慢镜头, 黄昏光" }, { "type": "image_url", "image_url": { "url": "https://...", "role": "first_frame" } }, { "type": "image_url", "image_url": { "url": "https://...", "role": "last_frame" } }, { "type": "video_url", "video_url": { "url": "https://...", "role": "reference_video" } }, { "type": "audio_url", "audio_url": { "url": "https://..." } }, { "type": "draft_task","draft_task":{ "task_id": "gt_xxx" } } ] ``` | Block | 用法 | 适用模型 | |---|---|---| | `text` | 文本提示词 (T2V 必填) | 全系 | | `image_url` role=`first_frame` / `last_frame` / `reference_image` | 图生视频 / 首尾帧 / 参考图 | 全系支持 | | `video_url` role=`reference_video` | V2V 视频续写 | Seedance 2.0 | | `audio_url` | A2V 音频生视频 | Seedance 2.0 | | `draft_task` task_id | Draft 续推 (基于之前 task) | Seedance 1.5 Pro | ## 异步调用流程 ``` 1. POST /v1/videos/generations → 立即返 { id: "gt_xxx", status: "processing" } 2. GET /v1/videos/generations/{id} → 轮询直到 status=succeeded 3. response.content[].video_url → 视频 URL (BytePlus 上游签名 URL) ``` ## 详细字段说明 (跟 BytePlus 官方对齐) 下方 Request body 字段表是从官方文档摘取的核心字段. **完整字段 / 边界条件 / 错误码列表请以 [BytePlus ModelArk 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680) 为准**.
model | string | required | Seedance 模型 ID. 全部 5 个变体: - dreamina-seedance-2-0-260128 (顶级, 支持 V2V/A2V) - dreamina-seedance-2-0-fast-260128 (快速) - seedance-1-5-pro-251215 (Draft 预览) - seedance-1-0-pro-250528 (旗舰平衡) - seedance-1-0-pro-fast-251015 (经济快速) - dreamina-seedance-2-0-mini-260615 (轻量经济, 支持 V2V) |
content | array | BytePlus 原生输入数组 (推荐主用法). 5 种 type (注意 `role` 跟 `type` 同级放在 content item 外层, 不进 `image_url`/`video_url` 子对象): - text: `{ type:"text", text:"..." }` 文本提示词 - image_url: `{ type:"image_url", image_url:{ url }, role:"first_frame"|"last_frame"|"reference_image" }` 图生视频 - video_url: `{ type:"video_url", video_url:{ url }, role:"reference_video" }` 视频续写 (Seedance 2.0) - audio_url: `{ type:"audio_url", audio_url:{ url } }` 音频生视频 (Seedance 2.0 A2V) - draft_task: `{ type:"draft_task", draft_task:{ task_id } }` Draft 续推 (Seedance 1.5 Pro) 如果不传, endpoint 会从. | |
duration | integer | 视频时长 (秒). 统一范围 4-15s, 各模型实际上限不同 (超出时上游返 400). 具体见 [BytePlus 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680) | |
resolution | string | 分辨率 | |
ratio | string | BytePlus 原生宽高比 | |
generate_audio | boolean | 生成同步音频 (BytePlus 原生字段). 仅 Seedance 2.0 / 2.0 Fast / 1.5 Pro 支持 | |
draft | boolean | Draft 快速预览模式 (BytePlus 原生字段). 仅 Seedance 1.5 Pro 支持. 开启后费用降低 ~30%, 出粗剪用于参数验证 | |
seed | integer | 随机种子 (0~2^32-1), 固定后同 prompt 可复现相似视频 | |
camera_fixed | boolean | 镜头锁定 (不做运镜), 适合静态主体场景. | |
watermark | boolean | 添加平台水印 (默认 false) | |
return_last_frame | boolean | 返回末帧图片 URL (用作下一段续写首帧) | |
frames | integer | 帧数 (BytePlus 高级参数, 一般 duration 自动推算, 不需手动传) | |
callback_url | string | BytePlus 任务终态回调 URL. 任务成功 / 失败时, BytePlus 上游**直接** POST 到此地址 (绕开平台 webhook). 客户用 HTTPS 域名, 自己处理签名校验. 详见 [BytePlus 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680) | |
execution_expires_after | integer | 任务过期时间 (秒). 默认 172800 (48 小时, 跟 BytePlus 上限对齐). 超时后任务自动 expired, 终态可正常查询 | |
safety_identifier | string | 客户标识 (跟 OpenAI `user` 字段类似), 用于 BytePlus 内容审核回溯. 推荐传客户内部用户 ID 的 hash. 不参与计费, 仅审计用 | |
priority | string | 任务优先级. BytePlus 高级参数, 默认按 standard 队列处理. 详见 [BytePlus 官方文档](https://docs.byteplus.com/en/docs/ModelArk/2291680) | |
wait | boolean | true=阻塞模式 (最长 60s 同步等结果), false=异步立即返回 task_id (推荐) |
200 — 任务已提交 (异步, status=queued/running)curl -X POST https://api.router.ai/v1/videos/generations \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0-260128",
"content": [
{ "type": "text", "text": "@Image1, @Video1, 参考剧情和动作, 把人物换成猫" },
{ "type": "image_url", "image_url": { "url": "https://example.com/cat.jpg" }, "role": "reference_image" },
{ "type": "video_url", "video_url": { "url": "https://example.com/clip.mp4" }, "role": "reference_video" }
],
"ratio": "adaptive",
"duration": 10,
"resolution": "720p",
"generate_audio": true
}'## 错误处理 | HTTP 状态码 | 错误类型 | 描述 | |---|---|---| | 400 | `InvalidParameter` | 参数错误 | | 400 | `InvalidParameter.MissingRequired` | 必填字段未提供 (e.g. prompt / model / content[]) | | 400 | `InvalidParameter.NotInEnum` | 枚举值非法 (resolution / aspect_ratio / role 等) | | 400 | `InvalidParameter.UnsupportedImageFormat` | 图片格式不支持 | | 400 | `InvalidParameter.UnsupportedVideoFormat` | 视频格式不支持 | | 400 | `InvalidParameter.UnsupportedAudioFormat` | 音频格式不支持 | | 400 | `InvalidParameter.ImageSizeTooLarge` | 图片体积超上游单文件限制 | | 400 | `InvalidParameter.VideoSizeTooLarge` | 输入视频体积超限 | | 400 | `InvalidParameter.VideoDurationTooLong` | 输入视频时长超上限 | | 400 | `InvalidParameter.PromptTooLong` | prompt 字符数超模型上限 | | 400 | `InvalidParameter.UrlNotAccessible` | 上游下载客户提供的 image_url/video_url 失败 | | 400 | `InvalidParameter.UrlInvalid` | URL 格式非法 (非 http(s) / 字符错) | | 400 | `InvalidParameter.AspectRatioMismatch` | aspect_ratio 与输入图比例不一致 | | 400 | `InvalidParameter.ResolutionNotSupported` | 该模型不支持指定 resolution | | 400 | `InvalidParameter.DurationOutOfRange` | duration 超模型支持范围 | | 400 | `InvalidParameter.ContentEmpty` | prompt / content[] 全空 | | 400 | `InvalidParameter.UnsupportedRole` | content[].role 非法 | | 400 | `InvalidParameter.DataInspectionFailed` | 输入数据规格检查失败 (跟内容审核不同维度) | | 400 | `DataInspectionFailed` | 同上无前缀变体 | | 400 | `InputImageSensitiveContentDetected` | 输入图片包含敏感内容 (主类) | | 400 | `InputTextSensitiveContentDetected` | prompt 包含敏感内容 (主类, 子分类同 Image) | | 400 | `InputVideoSensitiveContentDetected` | 输入视频包含敏感内容 | | 400 | `InputAudioSensitiveContentDetected` | 输入音频包含敏感内容 | | 400 | `invalid_request_error` | 平台参数校验失败 (模型类型不匹配 / 必填字段缺失等) | | 401 | `unauthorized` | 无效或缺失. 检查 Bearer sk-xxx header | | 402 | `insufficient_balance` | 余额不足, 充值后重试 | | 403 | `permission_denied` | 模型未授权 / Token 被禁 / Token 过期 | | 404 | `model_not_found` | 模型名拼错或已下架 | | 404 | `ResourceNotFound` | 任务 ID 不存在或已过 BytePlus 7-8 天保留期被清理 | | 409 | `idempotency_conflict` | 同请求短时间重复提交, 等几秒重试或修改参数 | | 429 | `rate_limit_exceeded` | RPM/TPM 限流, 看 `Retry-After` header 退避 | | 429 | `RateLimitExceeded` | 上游限流 | | 429 | `Throttling` | 上游限流, 同 RateLimitExceeded | | 429 | `ConcurrencyExceeded` | 单时刻并发超 max_concurrent, 减少并发 | | 500 | `internal_error` | 平台服务端错 | | 500 | `InternalError` / `InternalServerError` | 上游内部错, 同上重试策略 | | 502 | `service_unavailable` | 上游通道全不可用 | | 502 | `BadGateway` | 上游网关错 | | 503 | `ServiceUnavailable` | 上游服务暂不可达 | | 504 | `RequestTimeout` / `ModelTimeoutException` | 上游推理超时 |