# Seedance 官方接口：完整字段与能力说明

更新时间：2026-10-21  
适用官方接口：`POST /api/v3/contents/generations/tasks`  
官方查询接口：`GET /api/v3/contents/generations/tasks/{task_id}`  
官方接口文档：[火山方舟创建视频生成任务](https://console.volcengine.com/ark/region:cn-beijing/docs/create-video-generation-task-api)

## 1. 先看结论

官方 Seedance 接口是异步任务接口。请求体核心结构为 `model + content[] + 参数字段`，其中 `content[]` 可以混合文本、图片、视频、音频和 Draft 任务。Seedance 2.0 系列支持文生、首帧图生、首尾帧图生、全模态参考生视频、视频编辑和视频延长；有声视频能力由 `generate_audio` 和参考音频共同决定。

本项目当前有两条相关路径：

| 路径 | 当前状态 | 说明 |
|---|---|---|
| `provider=seedance` 的标准视频链路 | 已接入 | `DoubaoSeedanceAdapter` 组装 `content/ratio/duration/generate_audio`，并支持部分参考媒体角色、`return_last_frame`。它不是任意字段的裸透传。 |
| `/api/v1/content/video/orchestrate/v2` + `skill=video.native` + `provider=seedance` | 代码已接入 | 方舟原生请求体按 JSON 透传，仅允许当前环境 `DOUBAO_VIDEO_MODELS` 白名单中的型号；禁止回调和凭证字段。账号权限与真实出片待验收。 |
| `/api/v1/content/video/orchestrate/v2` + `skill=video.native` + `provider=byzn_open` + `model=sd-2-0` | 已接入 | 这是百应开放 API 的 Seedance 别名，不是官方火山方舟凭证直连；`payload.request` 原样发送给百应。 |

标准 `seedance` 业务链路由适配器组装字段；官方字段的最大能力通过 `provider=seedance` 的 `video.native` 原生分支表达。原生分支不转换请求体，不保证账号已开通全部字段或型号。

## 2. 官方请求结构

```json
{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    { "type": "text", "text": "一只猫在雨夜街道奔跑" }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "generate_audio": true,
  "watermark": false
}
```

官方鉴权使用火山方舟 API Key；HTTP 请求为 JSON。任务创建成功后保存返回的 `id`，再通过查询接口轮询，不要重复创建任务。

## 3. 模型与能力矩阵

| 模型族 | 文生 | 首帧 | 首尾帧 | 参考图 | 参考视频 | 参考音频 | 编辑 | 延长 | 说明 |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---|
| Seedance 2.0 系列 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓* | ✓ | ✓ | 音频不能单独输入，至少还要有图片或视频；单视频最长 15s，参考视频最多 3 个。 |
| Seedance 2.0 fast/mini | ✓ | ✓ | ✓ | ✓ | ✓ | ✓* | ✓ | ✓ | 当前官方文档中的 1080p 对 fast/mini 暂不支持。 |
| Seedance 2.5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 支持仅传音频；全模态参考最多图片 30 张、视频 10 个、音频 10 个。 |
| Seedance 1.0 pro | ✓ | ✓ | ✓ | — | — | — | — | — | 官方文档标注支持文生、首帧和首尾帧。 |
| Seedance 1.0 pro fast | ✓ | ✓ | — | — | — | — | — | — | 官方文档标注支持文生和首帧。 |

`*` 表示 Seedance 2.0 系列支持参考音频，但不能只传音频；必须同时提供至少一张图片或一个视频。

## 4. 顶层字段

| 字段 | 类型 | 必填 | 能力与取值 | 备注 |
|---|---|---:|---|---|
| `model` | string | 是 | 官方 Model ID 或 Endpoint ID，例如 `doubao-seedance-2-0-260128` | 必须与账号开通情况、地域和 Endpoint 一致。不要把项目内部 `sd-2-0` 当作官方 Model ID。 |
| `content` | object[] | 是 | 输入内容列表 | 可以包含 `text`、`image_url`、`video_url`、`audio_url`、`draft_task`。不同任务类型的组合有互斥关系。 |
| `resolution` | string | 否 | `480p`、`720p`、`1080p`、`4k` | 模型和任务类型共同决定实际可用值；Seedance 2.0 fast/mini 当前不支持 1080p。 |
| `ratio` | string | 否 | `adaptive`、`16:9`、`9:16`、`1:1`、`4:3`、`3:4`、部分模型支持 `21:9` | 编辑、延长、Seedance 2.5 首帧/首尾帧场景通常要求 `adaptive`。 |
| `duration` | integer | 否 | Seedance 2.0 通常 `4-15`；Seedance 2.5 通常 `4-30`；Seedance 1.0 pro 为 `2-12` | `-1` 表示由模型选择时长；Seedance 2.5 编辑任务必须使用 `-1`。与 `frames` 二选一，`frames` 优先。 |
| `frames` | integer | 否 | 官方约束为符合 `25 + 4n` 的帧数，范围约 `29-289` | 用于非整数秒时长；与 `duration` 同时传时以 `frames` 为准。 |
| `seed` | integer | 否 | 随机种子 | 相同 seed 不保证输出完全一致。 |
| `camera_fixed` | boolean | 否 | 是否固定镜头 | 直接字段强校验；也可按官方弱校验语法写入 prompt，但本项目不建议使用弱校验。 |
| `watermark` | boolean | 否 | 是否添加水印 | 是否可用及默认值以模型/账号为准。 |
| `generate_audio` | boolean | 否 | 是否生成有声视频 | 当前本项目标准适配器默认倾向于传 `true`；官方裸接口应由调用方显式指定。 |
| `return_last_frame` | boolean | 否 | 是否返回官方尾帧 | 适用于分段衔接；返回结果中的 `content.last_frame_url` 才是官方产物。 |
| `draft` | boolean | 否 | 不建议作为通用顶层字段使用 | Draft 正式输入应使用 `content[].draft_task.id`；不要把未在当前模型文档中声明的顶层 `draft` 当作稳定字段。 |
| `omni_reference_task_type` | string | 否 | `auto`、`reference`、`edit`、`extend` | 主要是 Seedance 2.5 的任务类型引导；2.0 不应盲目发送 2.5 专属字段。 |

官方文档还允许把部分参数写入 prompt 的弱校验形式，例如 `--rs 720p --rt 16:9 --dur 5`。项目裸接口文档和示例统一采用 JSON 顶层字段，不依赖弱校验解析。

## 5. `content[]` 完整字段

### 5.1 文本：`type=text`

```json
{ "type": "text", "text": "主体、动作、镜头、环境、风格和声音要求" }
```

| 字段 | 类型 | 必填 | 说明 |
|---|---|---:|---|
| `type` | string | 是 | 固定为 `text`。 |
| `text` | string | 是 | 视频生成提示词。官方建议中文不超过 500 字、英文不超过 1000 词；过长会降低信息聚焦。 |

2.0 全模态参考生成时，提示词中可使用 `Image 1`、`Video 1` 等标识指向素材；标识编号必须与 `content[]` 中对应素材的顺序一致。

### 5.2 图片：`type=image_url`

```json
{
  "type": "image_url",
  "role": "first_frame",
  "image_url": { "url": "https://cdn.example.com/start.jpg" }
}
```

| 字段 | 类型 | 必填 | 取值/说明 |
|---|---|---:|---|
| `type` | string | 是 | 固定为 `image_url`。 |
| `image_url.url` | string | 是 | 公网 HTTP(S) URL、`data:image/<format>;base64,...`，或官方 `asset://<ASSET_ID>`。 |
| `role` | string | 场景相关 | `first_frame`、`last_frame`、`reference_image`。首帧可以省略 role；首尾帧必须明确两种 role；参考图必须使用 `reference_image`。 |

图片格式可用 `jpeg/png/webp/bmp/tiff/gif`，2.0 及以上额外支持 `heic/heif`；宽高比约束 `[0.4,2.5]`，宽高边长 `[300,6000]`，单张小于 30MB，请求体不超过 64MB。

### 5.3 视频：`type=video_url`

```json
{
  "type": "video_url",
  "role": "reference_video",
  "video_url": { "url": "https://cdn.example.com/reference.mp4" }
}
```

| 字段 | 类型 | 必填 | 说明 |
|---|---|---:|---|
| `type` | string | 是 | 固定为 `video_url`。 |
| `video_url.url` | string | 是 | 公网视频 URL 或官方 `asset://<ASSET_ID>`。 |
| `role` | string | 是 | 固定为 `reference_video`。 |

2.0 系列单视频时长 `[2,15]` 秒，最多 3 个参考视频，总时长不超过 15 秒；2.5 非编辑视频单视频 `[2,30]` 秒，最多 10 个，总时长不超过 30 秒。支持 MP4/MOV，单个视频不超过 200MB，FPS `[24,60]`。

### 5.4 音频：`type=audio_url`

```json
{
  "type": "audio_url",
  "role": "reference_audio",
  "audio_url": { "url": "https://cdn.example.com/voice.mp3" }
}
```

| 字段 | 类型 | 必填 | 说明 |
|---|---|---:|---|
| `type` | string | 是 | 固定为 `audio_url`。 |
| `audio_url.url` | string | 是 | 公网音频 URL；大文件不要直接 Base64 放入请求体。 |
| `role` | string | 是 | 固定为 `reference_audio`。 |

格式为 WAV/MP3。2.0 系列单段 `[2,15]` 秒，最多 3 段，总时长不超过 15 秒；2.5 单段 `[2,30]` 秒，最多 10 段，总时长不超过 30 秒；单段不超过 15MB。

### 5.5 Draft：`type=draft_task`

```json
{
  "type": "draft_task",
  "draft_task": { "id": "draft-task-id" }
}
```

仅 Seedance 2.5 支持通过样片任务 ID 生成正式视频。Draft 任务 ID 有效期为 7 天；正式生成时部分参数会复用，部分参数禁止重复发送，必须以官方 Draft 规则为准。

## 6. 任务组合规则

| 场景 | `content[]` 组合 | 关键字段 |
|---|---|---|
| 文生 | 一个 `text` | `ratio`、`duration`、`resolution` |
| 首帧图生 | `text`（可选）+ 一个 `image_url` | 图片 `role=first_frame` 或省略；2.0/2.5 支持 |
| 首尾帧图生 | `text`（可选）+ 两个 `image_url` | 严格使用 `first_frame` + `last_frame`；不与全模态参考混用 |
| 参考图生 | `text`（可选）+ 1-9/30 个 `image_url` | 每张图片 `role=reference_image` |
| 参考视频 | `text`（可选）+ `video_url` | `role=reference_video` |
| 有声全模态 | 图片/视频/音频组合 | `generate_audio=true`；2.0 不能只传音频 |
| 编辑 | 至少一个 `reference_video` | 2.5 需 `omni_reference_task_type=edit`、`ratio=adaptive`、`duration=-1` |
| 延长 | 至少一个 `reference_video` | 2.5 需 `omni_reference_task_type=extend`、`ratio=adaptive` |

首帧、首尾帧、全模态参考是互斥入口。若需要全模态素材同时强约束首尾帧，官方建议优先使用首尾帧模式；全模态模式只能通过 prompt 指定某张参考图充当首尾帧。

## 7. 官方直接调用示例

### 7.0 项目 PHP 转发外层示例

项目通过 `/api/v1/content/video/orchestrate/v2` 转发时，PHP 会在请求末尾补充兼容字段；前端范例保留这两个字段即可，服务端会接收后丢弃，真正的视频模型仍以 `credentials.video.model` 为准。

```json
{
  "skill": "video.native",
  "payload": {
    "kind": "native_generation",
    "provider": "byzn_open",
    "operation": "video_generation",
    "request": {
      "model": "doubao-seedance-2-0-260128",
      "content": [
        { "type": "text", "text": "镜头从室内推向窗外，人物走到窗边，保持首尾构图连贯。" }
      ],
      "resolution": "720p",
      "ratio": "adaptive",
      "duration": 10,
      "generate_audio": true,
      "watermark": false
    }
  },
  "execution": {
    "dry_run": true,
    "idempotency_key": "native-seedance-example-001"
  },
  "credentials": {
    "video": {
      "model": "sd-2-0",
      "key": "{{VIDEO_MODEL_KEY}}",
      "contentId": "{{VIDEO_MODEL_CONTENT_ID}}"
    }
  },
  "type": "video",
  "model": "sd-2-0"
}
```

### 7.1 Seedance 2.0 首尾帧、有声视频

```json
{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    { "type": "text", "text": "镜头从室内推向窗外，人物走到窗边，保持首尾构图连贯。" },
    { "type": "image_url", "role": "first_frame", "image_url": { "url": "https://cdn.example.com/first.jpg" } },
    { "type": "image_url", "role": "last_frame", "image_url": { "url": "https://cdn.example.com/last.jpg" } },
    { "type": "audio_url", "role": "reference_audio", "audio_url": { "url": "https://cdn.example.com/audio.mp3" } }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": 10,
  "generate_audio": true,
  "watermark": false
}
```

### 7.2 当前项目标准 `seedance` 路径的字段边界

当前 `app/video_agents/doubao.py` 实际提交的核心字段为：

```json
{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    { "type": "text", "text": "项目生成的提示词" },
    { "type": "image_url", "image_url": { "url": "https://cdn.example.com/reference.jpg" }, "role": "reference_image" },
    { "type": "video_url", "video_url": { "url": "https://cdn.example.com/reference.mp4" }, "role": "reference_video" },
    { "type": "audio_url", "audio_url": { "url": "https://cdn.example.com/reference.mp3" }, "role": "reference_audio" }
  ],
  "ratio": "9:16",
  "duration": 15,
  "generate_audio": true,
  "return_last_frame": true
}
```

该路径会对普通业务 prompt 进行项目级组装；`resolution`、`seed`、`camera_fixed`、`watermark`、`frames`、`draft_task` 等官方字段目前没有从标准 `VideoGenerationCommand` 全量透传。不要用标准路径验证“官方全字段裸接口”。

## 8. 限制、风险与验收建议

1. 2.0/2.5 不允许直接上传含有真人脸的参考图/视频；必须使用官方允许的已授权素材、虚拟人像或模型原始产物。
2. URL 必须能被火山方舟服务端访问；本机地址、内网地址、浏览器临时 Blob URL 和未授权 `asset://` 不能直接作为外部 URL。
3. 生成任务是异步的，必须记录 `task_id` 并轮询；结果 URL 不能当作永久存储地址，项目应继续归档为稳定资产。
4. `ratio`、`duration`、`resolution` 的支持集合随模型和任务场景变化；错误字段可能被忽略，也可能导致异步失败。
5. 文档能力不等于账号已开通能力。上线前至少分别验收文生、首帧、首尾帧、参考视频、参考音频、编辑、延长、归档和重启后读取。

## 9. 代码与来源

- 项目官方适配器：[app/video_agents/doubao.py](../../../app/video_agents/doubao.py)
- 项目字段模型：[app/schemas/video.py](../../../app/schemas/video.py)
- 官方 API：[火山方舟创建视频生成任务](https://console.volcengine.com/ark/region:cn-beijing/docs/create-video-generation-task-api)
- 官方模型说明：[Seedance 2.0](https://docs.volcengine.com/docs/ark/seedance-2-0?lang=zh)
- 说明：本文未记录任何真实 API Key、平台密钥或请求级凭证。
