wan2.7-r2vを使用してください。
モデル仕様
Wan APIリファレンスには、モデル固有のフィールド、メディアの制限、デフォルト値、ポーリングの手順が定義されています。別のバージョンの入力フィールドや出力サイズのフィールドを流用しないでください。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Wan 2.7 R2Vは、被写体とシーンに最大5つの画像・動画参照を使用し、オプションで最初のフレームの制御や参照ごとの声質指定が可能です。
wan2.7-r2vを使用してください。
| プロパティ | 値 |
|---|---|
| モード | 参照から動画への生成 |
| 解像度 | 720P / 1080P |
| 長さ(秒) | 2~15(動画なし) / 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-r2v",
"metadata": {
"input": {
"prompt": "Image 1 slowly rotates on a white tabletop. Static camera, soft studio lighting.",
"media": [
{
"type": "reference_image",
"url": "https://example.com/reference.png"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "1:1",
"duration": 2,
"watermark": false
}
}
}'
import json
import os
import requests
payload = json.loads(r'''
{
"model": "wan2.7-r2v",
"metadata": {
"input": {
"prompt": "Image 1 slowly rotates on a white tabletop. Static camera, soft studio lighting.",
"media": [
{
"type": "reference_image",
"url": "https://example.com/reference.png"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "1:1",
"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)