dreamina-seedance-2-0-260128,版本字尾屬於 ID 的一部分。
完整欄位說明見 Dreamina API。
模型參數與限制
| 設定 | 取值 |
|---|---|
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,並將影像、影片、音訊佔位地址替換為可訪問的源素材。
文生影片
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
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)
首幀圖生影片
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
}
}'
影片參考
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
}
}'
影像與音訊參考
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
}
}'