dreamina-seedance-2-0-mini-260615,版本后缀属于 ID 的一部分。
完整字段说明见 Dreamina API。
模型参数与限制
| 设置 | 取值 |
|---|---|
model | dreamina-seedance-2-0-mini-260615 |
| 输入方式 | 文本、首帧图像、首尾帧图像或全模态参考。 |
metadata.content | 必填输入数组。文生视频须包含文本项,内容与顶层 prompt 保持一致。 |
metadata.duration | 4-15 / -1 秒;-1 自动选择时长。 |
metadata.resolution | 480p, 720p;默认 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-mini-260615",
"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-mini-260615",
"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-mini-260615",
"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-mini-260615",
"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-mini-260615",
"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
}
}'