> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan 2.7 R2V

> 万相 2.7 R2V 支持最多五个图像/视频参考，可结合首帧控制，并为参考主体指定音色。

万相 2.7 R2V 支持最多五个图像/视频参考，可结合首帧控制，并为参考主体指定音色。

使用完整模型 ID `wan2.7-r2v` 调用 MixRoute 视频生成接口。

## 模型规格

| 项目    | 说明                                                 |
| ----- | -------------------------------------------------- |
| 类型    | 参考生视频                                              |
| 分辨率   | 720P / 1080P                                       |
| 时长（秒） | 2-15（无视频）/ 2-10（有视频）                               |
| 输出    | MP4 / 30 fps                                       |
| 请求    | `model` + `metadata.input` + `metadata.parameters` |

完整字段、素材限制、默认值及轮询流程见 [通义万相接口](/cn/api-reference/endpoint/wan)。不要跨版本复用输入和输出尺寸字段。

## 请求示例

设置 MIXROUTE\_API\_KEY，并将媒体占位值替换为可访问的文件。

```bash theme={null}
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
    }
  }
}'
```

### Python

```python theme={null}
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)
```

保存提交返回的 MixRoute 任务 ID，通过 [查询视频任务](/cn/api-reference/endpoint/query-video-task) 轮询至 SUCCESS 或 FAILURE。成功后读取 data.result\_url，上游原始结果与 usage 位于 data.data。
