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

# Wan 2.7 — 参考图生视频

> 使用 Wan 2.7，基于至多 5 张参考图和/或 3 段参考视频生成视频。

|              |                       |
| ------------ | --------------------- |
| **Model ID** | `alibaba/wan-2-7-r2v` |
| **Family**   | `wan-2-7-novita`      |
| **Task**     | `reference-to-video`  |
| **Modality** | Video                 |
| **Upstream** | Alibaba Wan 2.7       |

<Note>
  与 T2V 一样，输出尺寸由显式的 `size` 字段（完整的像素
  尺寸）决定——它同时设定宽高比和价格档位。`image_urls`
  或 `video_urls` 至少要提供其中一个——本任务的意义就在于
  以参考素材来引导生成。
</Note>

## Endpoint

```http theme={null}
POST https://vibetoken.cn/v1/videos/generations
```

异步——返回 `{id, status: "pending"}`；轮询
`GET /v1/videos/generations/{id}` 直至状态变为 `success` 或 `failed`。

## Parameters

<ParamField body="prompt" type="string" required>
  描述所需视频的文本提示词。最多 1500 个字符。
</ParamField>

<ParamField body="image_urls" type="string[]">
  至多 5 个参考图 URL（HTTPS，PNG / JPEG）。
</ParamField>

<ParamField body="video_urls" type="string[]">
  至多 3 个参考视频 URL（HTTPS，MP4）。
</ParamField>

<ParamField body="size" type="enum" default="&#x22;1920*1080&#x22;">
  完整的像素尺寸——设定宽高比和价格档位。取值之一为
  `1920*1080`、`1080*1920`、`1440*1440`、`1632*1248`、`1248*1632`
  （约 2M 像素，**$0.15/s**），或 `1280*720`、`720*1280`、`960*960`、   `1088*832`、`832*1088`（约 0.9M 像素，**$0.10/s**）。
</ParamField>

<ParamField body="duration" type="integer" default="5">
  生成片段的时长，单位为秒。范围 `[2, 10]`。
</ParamField>

<ParamField body="shot_type" type="&#x22;single&#x22; | &#x22;multi&#x22;" default="&#x22;single&#x22;">
  `multi` 允许模型在多个镜头之间切换；`single` 则保持连续的
  一镜到底。
</ParamField>

<ParamField body="audio" type="boolean" default="true">
  是否生成同步的音轨。
</ParamField>

<ParamField body="negative_prompt" type="string">
  用于引导模型避开的内容。最多 500 个字符。
</ParamField>

<ParamField body="watermark" type="boolean" default="false">
  是否在输出上叠加上游水印。
</ParamField>

<ParamField body="seed" type="integer">
  随机数生成器的初始化种子。范围 `[0, 2147483647]`。
</ParamField>

## Example

```bash theme={null}
curl https://vibetoken.cn/v1/videos/generations \
  -H "Authorization: Bearer $VIBETOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/wan-2-7-r2v",
    "prompt": "a stylised remix of the references, moody lighting",
    "image_urls": ["https://example.com/ref-a.jpg", "https://example.com/ref-b.jpg"],
    "size": "1920*1080",
    "duration": 5,
    "shot_type": "multi"
  }'
```

```json theme={null}
{ "id": "wan_r2v_001…", "status": "pending", "model": "alibaba/wan-2-7-r2v" }
```

轮询直至终态：

```bash theme={null}
curl https://vibetoken.cn/v1/videos/generations/wan_r2v_001… \
  -H "Authorization: Bearer $VIBETOKEN_API_KEY"
```

```json theme={null}
{
  "id": "wan_r2v_001…",
  "status": "success",
  "data": [{ "url": "https://…mp4" }]
}
```

## Reference
