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

# 通义万相2.6

通义万相2.6视频生成模型,支持文生视频，图生视频（基于首帧），参考生视频，新增多镜头叙事能力，同时支持自动配音和传入自定义音频文件，万相-参考生视频模型支持参考输入视频或图像中的角色形象，同时可参考视频中的音色，搭配提示词生成表演视频。

### 模型参数

* 模型ID：`wan2.6-t2v`/`wan2.6-i2v`/`wan2.6-i2v-flash`/`wan2.6-r2v`/`wan2.6-r2v-flash`
* 模型价格：你可以在[模型广场](https://geekai.co/models?platform=dashscope\&type=video)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/videos/generations`
* 模型参数：参考[视频 API 手册](https://docs.geekai.co/cn/api/video/generations.md)
* API认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start.md)

> [!NOTE]
>
> 不支持视频 API 中的以下参数：
>
> * `aspect_ratio`
> * `image_tail`
> * `quality`
> * `fps`
>
> 附：[万相2.6 官方 API 文档](https://help.aliyun.com/zh/model-studio/use-video-generation)

指定生成的视频分辨率可通过`size`参数，格式为宽x高,具体参考值同万相2.1

### 文生视频

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.6-t2v",
    "prompt": "一只小猫在月光下奔跑",
    "negative_prompt": "花朵",
    "size": "1280x720"
}'
```

`wan2.6-t2v`也支持传入音频文件，通过`audio_url`参数传递即可：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.6-t2v",
    "prompt": "一幅史诗级可爱的场景。一只小巧可爱的卡通小猫将军，身穿细节精致的金色盔甲，头戴一个稍大的头盔，勇敢地站在悬崖上。他骑着一匹虽小但英勇的战马，说：”青海长云暗雪山，孤城遥望玉门关。黄沙百战穿金甲，不破楼兰终不还。“。悬崖下方，一支由老鼠组成的、数量庞大、无穷无尽的军队正带着临时制作的武器向前冲锋。这是一个戏剧性的、大规模的战斗场景，灵感来自中国古代的战争史诗。远处的雪山上空，天空乌云密布。整体氛围是“可爱”与“霸气”的搞笑和史诗般的融合。",
    "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250923/hbiayh/%E4%BB%8E%E5%86%9B%E8%A1%8C.mp3",
    "size": "1280x720"
}'
```

响应是一个 JSON 对象，包含生成视频的 URL：

```json theme={null}
{
    "model": "wan2.6-t2v",
    "task_id": "025f3574-5b1f-4c39-93b8-02498d2c7674",
    "task_status": "succeed",
    "video_result": [
        {
            "id": "5897099e-2a2b-4409-a35d-f7a5f4539dc3",
            "url": "https://static.geekai.co/video/2026/04/10/5e13e21fb9500ef1350bc2676b650dee.mp4"
        }
    ]
}
```

下面图生视频等生成响应结构是一样的，不再列举。

### 图生视频(基于首帧)

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.6-i2v",
    "prompt": "一幅都市奇幻艺术的场景。一个充满动感的涂鸦艺术角色。一个由喷漆所画成的少年，正从一面混凝土墙上活过来。他一边用极快的语速演唱一首英文rap，一边摆着一个经典的、充满活力的说唱歌手姿势。场景设定在夜晚一个充满都市感的铁路桥下。灯光来自一盏孤零零的街灯，营造出电影般的氛围，充满高能量和惊人的细节。视频的音频部分完全由他的rap构成，没有其他对话或杂音。",
    "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
    "resolution": "720P"
}'
```

支持传入音频文件的url:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.6-i2v",
    "prompt": "一幅都市奇幻艺术的场景。一个充满动感的涂鸦艺术角色。一个由喷漆所画成的少年，正从一面混凝土墙上活过来。他一边用极快的语速演唱一首英文rap，一边摆着一个经典的、充满活力的说唱歌手姿势。场景设定在夜晚一个充满都市感的铁路桥下。灯光来自一盏孤零零的街灯，营造出电影般的氛围，充满高能量和惊人的细节。视频的音频部分完全由他的rap构成，没有其他对话或杂音。",
    "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
    "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3",
    "resolution": "720P",
    "duration": 10
}'
```

> [!NOTE]
>
> `wan2.6-i2v-flash`调用方式同上，wan2.6-i2v-flash 和 wan2.6-i2v 的`resolution`可选值：720P、1080P(注意分辨率的P需要大写),  图像同样也支持 Base64 编码数据，通过image参数传递即可

### 参考生视频

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.6-r2v-flash",
    "prompt": "Character2 坐在靠窗的椅子上，手持 character3，在 character4 旁演奏一首舒缓的美国乡村民谣。Character1 对Character2开口说道：“听起来不错”",
    "size": "1280x720",
    "duration": 10,
    "extra_body": {
        "reference_urls": [
            "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/hfugmr/wan-r2v-role1.mp4",
            "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4",
            "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png",
            "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"
        ]
    }
}'
```

> [!NOTE]
>
> `wan2.6-r2v`调用方式同上，替换模型名称即可

### 异步任务

由于视频生成通常比较耗时，建议通过极客智坊提供的通用异步方式生成视频。

[视频 API](https://docs.geekai.co/cn/api/video/generations.md) 中的 `async` 参数用于控制是否异步生成视频，默认为 `false`，表示创建视频接口会同步等待视频生成完毕并返回。如果设置为 `true`，则会异步生成视频并返回任务ID，你可以使用该任务ID轮询视频生成状态。

具体操作请参考[Sora-2示例](https://docs.geekai.co/cn/docs/video/openai/sora-2#异步任务)，流程完全一样。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.