跳转到主要内容
首帧(DashScope V1)

爱诗 PixVerse — 创建任务

基于首帧图片提交爱诗 PixVerse 图生视频异步任务

POST
/services/aigc/video-generation/video-synthesis
curl --location 'https://maas.qianwenaiapi.com/api/v1/services/aigc/video-generation/video-synthesis' \
  --header 'X-DashScope-Async: enable' \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "pixverse/pixverse-c1-it2v",
    "input": {
      "media": [
        {
          "type": "image_url",
          "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260121/zlpocv/wan-i2v-haigui.webp"
        }
      ],
      "prompt": "镜头从海龟下方缓缓上移,海龟悠然游动,腹部细节清晰可见。"
    },
    "parameters": {
      "resolution": "720P",
      "duration": 5,
      "audio": false,
      "watermark": false
    }
  }'
{
  "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx",
  "output": {
    "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
    "task_status": "PENDING"
  }
}

模型概览

模型名说明
pixverse/pixverse-c1-it2v旗舰动作与特效模型,适合动态镜头、打光等复杂运动场景;首帧模式支持通过提示词格式指定镜头类型
pixverse/pixverse-v6-it2v通用高质量模型,适合人像、风景等多种主题;通过 shot_type 参数开启多镜头模式
pixverse/pixverse-v5.6-it2v旧版模型,最大分辨率 1080P,支持时长 5、8、10 秒(1080P 仅支持 5、8 秒)

输入限制

首帧图像要求
限制项要求
格式JPG、PNG、WEBP
最长边不超过 10000 像素
文件大小不超过 20 MB
URL 类型HTTP/HTTPS 公网可访问地址
分辨率与时长
模型支持分辨率支持时长
pixverse/pixverse-c1-it2v360P、540P、720P、1080P1–15 秒
pixverse/pixverse-v6-it2v360P、540P、720P、1080P1–15 秒
pixverse/pixverse-v5.6-it2v360P、540P、720P、1080P360P/540P/720P: 5、8、10 秒;1080P: 5、8 秒

多镜头模式

c1 模型:在 input.prompt 中描述多镜头场景即可,模型会根据提示词内容自动生成对应镜头运动。不支持设置 shot_type 参数。 v6 模型:将 parameters.shot_type 设为 multi,模型将自动生成多镜头组合视频;设为 single(默认)则输出单一连续镜头。

使用流程

  1. 调用本接口提交图生视频任务,获取 task_id。
  2. 调用查询图生视频任务结果(基于首帧)接口,使用 task_id 轮询任务状态,直到获取生成的视频 URL。

错误码

大模型服务通用状态码请查阅错误码。
  • Python SDK
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope
import os

# 若没有配置环境变量,请用千问AI平台API Key将下行替换为:api_key="sk-xxx"
# 获取API Key:https://platform.qianwenai.com/home/api-keys
api_key = os.getenv("DASHSCOPE_API_KEY")

media = [{'type': 'image_url', 'url': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260121/zlpocv/wan-i2v-haigui.webp'}]

def sample_async_call():
    # 异步提交视频生成任务
    rsp = VideoSynthesis.async_call(api_key=api_key,
                                model='pixverse/pixverse-c1-it2v',
                                media=media,
                                prompt='镜头从海龟下方缓缓上移,海龟悠然游动,腹部细节清晰可见。',
                                resolution='720P',
                                duration=5,
                                audio=False,
                                watermark=True)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print("task_id: %s" % rsp.output.task_id)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))

    # 查询任务状态
    status = VideoSynthesis.fetch(task=rsp, api_key=api_key)
    if status.status_code == HTTPStatus.OK:
        print(status.output.task_status)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (status.status_code, status.code, status.message))

    # 等待任务完成
    rsp = VideoSynthesis.wait(task=rsp, api_key=api_key)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print(rsp.output.video_url)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))

if __name__ == '__main__':
    sample_async_call()

鉴权

string
header
必填

千问AI平台 API Key。详见获取 API Key。

Header 参数

enum<string>
必填

固定值 enable,启用异步模式。

enable

请求体

application/json
enum<string>
必填

模型名称。

  • pixverse/pixverse-c1-it2v:擅长动作、特效和高速运动场景。
  • pixverse/pixverse-v6-it2v:通用图生视频模型。
  • pixverse/pixverse-v5.6-it2v:旧版模型,建议升级至 v6。
pixverse/pixverse-c1-it2v,pixverse/pixverse-v6-it2v,pixverse/pixverse-v5.6-it2v
pixverse/pixverse-c1-it2v
object
必填

视频生成的输入内容。

object
必填

视频生成参数。

响应

200-application/json
string

本次请求的唯一 ID,用于排查问题。

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