> ## 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.

# Dreamina Seedance 2.0

> Dreamina Seedance 2.0：多模態影片生成模型。包含 MixRoute 呼叫範例與參數。

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/model-api/bytedance/dreamina-seedance-2-0" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/model-api/bytedance/dreamina-seedance-2-0" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/model-api/bytedance/dreamina-seedance-2-0" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/model-api/bytedance/dreamina-seedance-2-0" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/model-api/bytedance/dreamina-seedance-2-0" />

Dreamina Seedance 2.0 是 ByteDance 影片模型。請求使用完整路由 ID `dreamina-seedance-2-0-260128`，版本字尾屬於 ID 的一部分。

完整欄位說明見 [Dreamina API](/docs/zh-hant/api-reference/endpoint/dreamina)。

## 模型參數與限制

| 設定 | 取值 |
| - | - |
| `model` | `dreamina-seedance-2-0-260128` |
| 輸入方式 | 文本、首幀影像、首尾幀影像或全模態參考。 |
| `metadata.content` | 必填輸入陣列。文生影片須包含文本項，內容與頂層 prompt 保持一致。 |
| `metadata.duration` | 4-15 / -1 秒；-1 自動選擇時長。 |
| `metadata.resolution` | `480p`, `720p`, `1080p`, `4k`；預設 720p。 |
| `metadata.ratio` | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `adaptive` |
| 音訊 | `metadata.generate_audio` 預設 true；false 輸出無聲影片。 |
| 格式 | `mp4` |
| 幀率 | 24 fps |

* 頂層保留 `model`、`prompt`、`asset`；全部廠商欄位放入 `metadata`。媒體輸入示例設定 `asset=true`。
* 首尾幀角色與 `reference_*` 角色屬於不同輸入方式，不要混用。
* 預設寬高比為 adaptive，也可選擇受支援的具體比例。
* 全模態參考最多包含九張圖、三個影片和三個音訊；音訊參考必須與影像或影片參考同時使用。

## 呼叫示例

先設定 `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": "dreamina-seedance-2-0-260128",
  "prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
  "asset": false,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "1:1",
    "generate_audio": false,
    "watermark": false
  }
}'
```

### Python

```python theme={null}
import json
import os
import requests

payload = json.loads(r'''
{
  "model": "dreamina-seedance-2-0-260128",
  "prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
  "asset": false,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "1:1",
    "generate_audio": false,
    "watermark": false
  }
}
''')
response = requests.post(
    "https://api.mixroute.ai/v1/video/generations",
    headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
    json=payload,
    timeout=60,
)
response.raise_for_status()
result = response.json()
if result.get("code") not in (None, 0, 200, "0", "200", "success"):
    raise RuntimeError(result.get("message") or result)
print(result)
```

### 首幀圖生影片

```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": "dreamina-seedance-2-0-260128",
  "prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
  "asset": true,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://example.com/first-frame.png"
        },
        "role": "first_frame"
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "adaptive",
    "generate_audio": false,
    "watermark": 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": "dreamina-seedance-2-0-260128",
  "prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
  "asset": true,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "https://example.com/reference.mp4"
        },
        "role": "reference_video"
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "1:1",
    "generate_audio": false,
    "watermark": 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": "dreamina-seedance-2-0-260128",
  "prompt": "A ceramic mug slowly rotates on a white tabletop in soft daylight.",
  "asset": true,
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A ceramic mug slowly rotates on a white tabletop in soft daylight."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://example.com/reference.png"
        },
        "role": "reference_image"
      },
      {
        "type": "audio_url",
        "audio_url": {
          "url": "https://example.com/reference.mp3"
        },
        "role": "reference_audio"
      }
    ],
    "duration": 4,
    "resolution": "480p",
    "ratio": "1:1",
    "generate_audio": true,
    "watermark": false
  }
}'
```

## 任務結果

儲存提交返回的 MixRoute 任務 ID，使用 [查詢影片任務](/docs/zh-hant/api-reference/endpoint/query-video-task) 輪詢；任務成功後再讀取影片 URL，提交成功不代表影片已經生成完成。


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