跳转到主要内容
万相 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-t2v",
  "input": {
    "prompt": "A tense detective story with cinematic storytelling. Shot 1 [0\u20133 seconds] wide shot: Rainy New York street at night, neon lights flicker, a detective in a black trench coat walks briskly. Shot 2 [3\u20136 seconds] medium shot: The detective enters an old building, rain wets his coat, the door closes slowly behind him. Shot 3 [6\u20139 seconds] close-up: The detective\u2019s focused eyes, distant sirens sound, he frowns slightly. Shot 4 [9\u201312 seconds] medium shot: The detective moves carefully down a dim hallway, his flashlight illuminating the way. Shot 5 [12\u201315 seconds] close-up: The detective discovers a key clue, his face shows sudden realization."
  },
  "parameters": {
    "resolution": "720P",
    "ratio": "16:9",
    "prompt_extend": true,
    "watermark": true,
    "duration": 15
  }
}'
{
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx",
  "output": {
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
    "task_status": "PENDING"
  }
}
通过文本提示生成最长 15 秒的 1080P 视频,支持音频同步和多镜头叙事。

与 wan2.6 的区别

  • 分辨率控制:使用 resolution(720P/1080P)+ ratio(16:9、9:16 等)替代精确像素 size
  • 更长提示词:最多支持 5,000 字符(原为 1,500)。
  • 负向提示词位置变更:移至 input.negative_prompt,不再使用 parameters.negative_prompt
  • 移除 shot_type 参数:直接在提示词中描述镜头。
  • 水印默认关闭watermark 默认值改为 false(原为 true)。

鉴权

string
header
必填

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

Header 参数

enum<string>
必填

异步任务提交时必须设置为 enable

enable

请求体

application/json
enum<string>
必填

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

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

视频生成的输入内容。

object

视频生成参数。

响应

200-application/json
string

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

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