# Wan图生视频

**方法**: `POST`
**路径**: `/v2/videos/generations`

统一接口格式

## 请求参数

### Header 参数

```text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 application/json

```text
prompt
string
必需
model
enum<string>
必需
枚举值:
wan2.2-i2v-plus
wan2.2-i2v-flash
wanx2.1-i2v-turbo
wanx2.1-i2v-plus
duration
integer
可选
resolution
enum<string>
可选
wan2.2-i2v-plus：有效值：480P 和 1080P。默认值：1080P
wan2.2-i2v-flash：有效值：480P 和 720P。默认值：720P
wanx2.1-i2v-plus：有效值：720P。默认值：720P
wanx2.1-i2v-turbo：有效值：480P 和 720P。默认值：720P
枚举值:
720P
480P
1080P
images
array
[string]
仅支持一张参考图
必需
watermark
boolean
可选
template
string
可选
negative_prompt
string
可选
prompt_extend
string
可选
seed
integer
可选
示例
{
"prompt"
:
"dance"
,
"model"
:
"wan2.2-i2v-flash"
,
"images"
:
[
"https://webstatic.aiproxy.vip/dist/demo.jpg"
]
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/v2/videos/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "dance",
    "model": "wan2.2-i2v-flash",
    "images": [
        "https://webstatic.aiproxy.vip/dist/demo.jpg"
    ]
}'
```

## 返回响应

### 🟢 200 成功

**内容类型**: `application/json`

#### 响应结构

```text
task_id
string
必需
```

#### 示例

```json
{
    "task_id": "e7bed961-d1b9-4b3f-8ef9-5f441bde28c8"
}
```
