> ## 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-Hant/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。執行編輯範例前，將範例網址換成可存取的來源影片。

### 文字生成影片

```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-Hant/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-Hant/api-reference/endpoint/doubao.md)，素材格式和大小限制請參閱 [Seedance 素材限制](https://mixroute.ai/docs/zh-Hant/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.