跳转到主要内容
万相 2.7

Wan 2.7 — 创建任务

提交图生视频任务(wan2.7)

POST
/services/aigc/video-generation/video-synthesis
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
  -H 'X-DashScope-Async: enable' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "wan2.7-i2v",
  "input": {
    "prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life on a concrete wall. He sings an English rap song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The light comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of the rap, with no other dialogue or noise.",
    "media": [
      {
        "type": "first_frame",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
      },
      {
        "type": "driving_audio",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3"
      }
    ]
  },
  "parameters": {
    "resolution": "720P",
    "duration": 10,
    "prompt_extend": true,
    "watermark": true
  }
}'
{
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx",
  "output": {
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
    "task_status": "PENDING"
  }
}
支持从图片、音频和视频片段生成最长 15 秒、最高 1080P 分辨率的视频,可选音频同步和首末帧控制。

与 wan2.6 的区别

  • 统一 API:首帧、首末帧、视频续写共用同一接口,通过 media 数组区分,无需调用不同 API。
  • 音视频同步:提供 driving_audio 文件可实现口型同步;未提供时,模型自动生成匹配的音效。
  • 分辨率控制:通过 resolution(720P/1080P)设置分辨率,取代原来的像素级 size 参数。
  • 更长提示词:最多支持 5,000 字符(原为 800)。
  • 负向提示词位置调整:移至 input.negative_prompt,不再使用 parameters.negative_prompt
  • 水印默认关闭watermark 默认为 false(原为 true)。

鉴权

string
header
必填

千问云 API Key。详见获取 API Key

Header 参数

enum<string>
必填

必须设置为 enable,表示以异步方式提交任务。

enable

请求体

application/json
enum<string>
必填

模型标识符。可选值:wan2.7-i2v(主线版本,持续更新)、wan2.7-i2v-2026-04-25(快照版本,能力与主线一致)。

wan2.7-i2v,wan2.7-i2v-2026-04-25
wan2.7-i2v
object
必填

视频生成的输入数据。

object

视频生成参数。

响应

200-application/json
string

请求的唯一标识符,用于追踪和排查问题。

4909100c-7b5a-9f92-bfe5-xxxxxx
object