wan2.7-videoedit 调用 MixRoute 视频生成接口。
模型规格
完整字段、素材限制、默认值及轮询流程见 通义万相接口。不要跨版本复用输入和输出尺寸字段。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
万相 2.7 VideoEdit 通过自然语言编辑一个源视频,可搭配最多四张参考图片;不是纯文生视频模型。
wan2.7-videoedit 调用 MixRoute 视频生成接口。
| 项目 | 说明 |
|---|---|
| 类型 | 视频编辑 |
| 分辨率 | 720P / 1080P |
| 时长(秒) | 2-10 |
| 输出 | 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-videoedit",
"metadata": {
"input": {
"prompt": "Change the mug color to blue while preserving the original motion and white tabletop.",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 2,
"watermark": false
}
}
}'
import json
import os
import requests
payload = json.loads(r'''
{
"model": "wan2.7-videoedit",
"metadata": {
"input": {
"prompt": "Change the mug color to blue while preserving the original motion and white tabletop.",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 2,
"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)