> ## Documentation Index
> Fetch the complete documentation index at: https://mixroute.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Doubao Seedance 2.5 Flash

> 通过 MixRoute 调用 Doubao Seedance 2.5 Flash，支持 480p 或 720p 视频生成、编辑和延长。

Doubao Seedance 2.5 Flash 是字节跳动的 Seedance 2.5 快速版，支持文生视频、首帧或首尾帧生视频、全模态参考、视频编辑及延长。

`POST https://api.mixroute.ai/v1/video/generations`

`model`、`prompt` 和 `asset` 放在请求顶层，厂商参数放在 `metadata`。纯文本请求使用 `asset: false`，并在 `metadata.content` 中传入与 `prompt` 一致的文本项。传入参考素材时使用 `asset: true`。

> [!NOTE]
>
> Flash 不支持 Draft。省略 `metadata.draft`，也不要传 `draft_task` 内容项。需要草稿预览时，请使用[标准版 Doubao Seedance 2.5 路由](https://mixroute.ai/docs/zh-Hans/model-api/bytedance/doubao-seedance-2-5.md)。

## 参数与限制

| 字段 | 取值 |
| - | - |
| `model` | `doubao-seedance-2-5-flash-261115` |
| `metadata.resolution` | `480p` / `720p` (默认) |
| `metadata.duration` | 4–30 秒，或使用 `-1`（默认）自动选择时长。 |
| `metadata.ratio` | `16:9`、`4:3`、`1:1`、`3:4`、`9:16`、`21:9` 或 `adaptive`（默认）。 |
| `metadata.generate_audio` | `true`（默认）生成同步音频；`false` 输出无声视频。 |
| `metadata.output_format` | `mp4`（默认）或 `mov`；输出帧率为 24 fps。 |
| `metadata.omni_reference_task_type` | 全模态输入时可选：`auto`（默认）、`reference`、`edit` 或 `extend`。 |

## 输入模式

* 首帧生视频使用 `first_frame`；首尾帧生视频使用 `first_frame` 和 `last_frame`。`metadata.ratio` 必须设为 `adaptive`。不要混用帧角色和 `reference_*` 角色。
* 全模态参考使用 `reference_image`、`reference_video` 或 `reference_audio`。每次最多 10 张图片、5 段视频及 5 段音频，支持仅传音频参考。参考视频总时长和参考音频总时长各不超过 30 秒。
* 视频编辑须传入一段 4–30 秒的 `reference_video`，将 `metadata.ratio` 设为 `adaptive`，`metadata.duration` 设为 `-1`。延长视频也须传入 `reference_video`，并使用 `adaptive`。

## 请求示例

将 `MIXROUTE_API_KEY` 设置为 MixRoute API Key。运行编辑示例前，将示例 URL 换成可访问的源视频。

### 文生视频

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "doubao-seedance-2-5-flash-261115",
  "prompt": "A red ceramic mug turns slowly on a white tabletop in soft daylight.",
  "asset": false,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A red ceramic mug turns slowly on a white tabletop in soft daylight."
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "16:9",
    "generate_audio": false
  }
}'
```

### 编辑视频

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "doubao-seedance-2-5-flash-261115",
  "prompt": "Replace the white tabletop with a light wood surface. Keep the mug and camera motion unchanged.",
  "asset": true,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "Replace the white tabletop with a light wood surface. Keep the mug and camera motion unchanged."
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "https://example.com/source.mp4"
        },
        "role": "reference_video"
      }
    ],
    "omni_reference_task_type": "edit",
    "duration": -1,
    "resolution": "720p",
    "ratio": "adaptive",
    "generate_audio": false
  }
}'
```

## 查询任务

将 `MIXROUTE_TASK_ID` 换成提交请求返回的任务 ID，等任务成功后再读取视频 URL。状态和返回字段详见[查询视频任务](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/query-video-task.md)。

```bash theme={null}
curl "https://api.mixroute.ai/v1/video/generations/MIXROUTE_TASK_ID" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY"
```

共享参数参见 [Doubao API](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/doubao.md)，素材格式和大小限制参见 [Seedance 素材限制](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/seedance.md)。当前价格以[模型广场](https://console.mixroute.ai/models)为准。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.