wan2.7-i2v 呼叫 MixRoute 影片生成介面。
模型規格
完整欄位、素材限制、預設值及輪詢流程見 通義萬相介面。不要跨版本複用輸入和輸出尺寸欄位。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
萬相 2.7 I2V 支援首幀、首尾幀、驅動音訊,以及通過 first_clip 輸入影片片段續寫。
wan2.7-i2v 呼叫 MixRoute 影片生成介面。
| 專案 | 說明 |
|---|---|
| 型別 | 圖生影片 |
| 解析度 | 720P / 1080P |
| 時長(秒) | 2-15 |
| 輸出 | MP4 / 30 fps |
| 請求 | model + metadata.input + metadata.parameters |
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "wan2.7-i2v",
"metadata": {
"input": {
"prompt": "A red ceramic mug slowly rotates on a white tabletop. Static camera, soft studio lighting.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/reference.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 2,
"prompt_extend": false,
"watermark": false
}
}
}'
import json
import os
import requests
payload = json.loads(r'''
{
"model": "wan2.7-i2v",
"metadata": {
"input": {
"prompt": "A red ceramic mug slowly rotates on a white tabletop. Static camera, soft studio lighting.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/reference.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 2,
"prompt_extend": false,
"watermark": false
}
}
}
''')
response = requests.post(
"https://api.mixroute.ai/v1/video/generations",
headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
json=payload,
timeout=120,
)
response.raise_for_status()
result = response.json()
task_id = result.get("task_id") or result.get("id")
if not task_id:
raise RuntimeError(result.get("message") or result)
print(task_id)