seedance-1-5-pro-251215。
核心能力
- 文生视频 - 根据文本提示词生成视频
- 图生视频 - 使用图片作为首帧或参考
- 异步流程 - 提交任务后轮询获取结果
- 视频参考 - 使用参考视频生成或编辑
输出规格
| 属性 | 取值 |
|---|---|
| 分辨率 | 480p, 720p, 1080p |
| 宽高比 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive |
| 时长 | 4-12 s, or -1 |
| 同步音频 | 支持 |
| 格式 | mp4 |
| 帧率 | 24 fps |
调用流程
1. POST /v1/video/generations -> task_id
2. GET /v1/video/generations/{task_id} -> status
3. When the task succeeds -> read the video URL
调用示例
文生视频
- cURL
- Python
curl "https://api.mixroute.ai/v1/video/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-1-5-pro-251215",
"prompt": "A red square gently pulses on a clean white background",
"asset": false,
"metadata": {
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false,
"generate_audio": false
}
}'
import requests
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={'model': 'seedance-1-5-pro-251215',
'prompt': 'A red square gently pulses on a clean white background',
'asset': False,
'metadata': {'duration': 4,
'resolution': '480p',
'ratio': '1:1',
'watermark': False,
'generate_audio': False}},
)
print(response.json())
图生视频
curl "https://api.mixroute.ai/v1/video/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-1-5-pro-251215",
"prompt": "The subject turns toward the camera with a gentle motion",
"asset": true,
"metadata": {
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false,
"generate_audio": false,
"content": [
{
"type": "text",
"text": "The subject turns toward the camera with a gentle motion"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.png"
},
"role": "first_frame"
}
]
}
}'
视频生视频
curl "https://api.mixroute.ai/v1/video/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-1-5-pro-251215",
"prompt": "Make the reference video slightly warmer while preserving camera motion",
"asset": true,
"metadata": {
"duration": 4,
"resolution": "480p",
"ratio": "1:1",
"watermark": false,
"generate_audio": false,
"content": [
{
"type": "text",
"text": "Make the reference video slightly warmer while preserving camera motion"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
}
]
}
}'
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 固定为 seedance-1-5-pro-251215。 |
prompt | string | 是 | 视频生成指令。 |
asset | boolean | 是 | metadata.content 包含图片、视频或音频参考时设为 true;纯文本输入设为 false。 |
metadata | object | 是 | 包含全部 Seedance 生成参数与参考内容。 |
metadata.content | array | 否 | text、image_url、video_url 与 audio_url 内容项。 |
metadata.duration | integer | 否 | 视频时长,单位为秒。 |
metadata.resolution | string | 否 | 输出分辨率。 |
metadata.ratio | string | 否 | 输出宽高比。 |
metadata.generate_audio | boolean | 否 | 模型支持时生成同步音频。 |
metadata.watermark | boolean | 否 | 添加 AI 生成水印。 |
metadata.content[].role | string | 否 | first_frame、last_frame、reference_image、reference_video 或 reference_audio。 |
输入模式
| 模式 | 输入 |
|---|---|
| 文生视频 | text |
| 图生视频 | text + image_url |
| 视频生视频 | text + video_url |