PixMind Docs
API 参考视频模型Wan 2.7 视频生成

Wan 2.7 视频生成

通过 PixMind API 进行文字、图片和参考素材驱动的视频生成。

统一支持文字、图片、首尾帧和参考素材驱动的视频生成。

提供方

Alibaba

模型 ID

wan2.7-video

请求端点

POST /v1/generations

模型说明

  • 只需传入当前工作流需要的输入字段。
  • 参考视频输入最长 15 秒。

请求参数

参数类型必填说明
modelstring

稳定的 PixMind 模型 ID,请使用 `wan2.7-video`。

可选值: wan2.7-video

promptstring

用于生成或编辑的自然语言指令。

resolutionstring

输出视频分辨率,该字段会影响每秒价格。

可选值: 720p, 1080p

默认值: 720p

durationinteger

期望生成的视频时长,单位为秒。

可选值: 5, 10, 15

默认值: 5

aspect_ratiostring

期望输出画面比例。

可选值: 16:9, 9:16, 1:1, 4:3, 3:4

默认值: 16:9

image_urlstring (URI)

图生视频使用的起始图片。

callback_urlstring (URI)

接收任务终态事件的 HTTPS 地址;不填写时仍可使用轮询。

last_frame_urlstring (URI)

与 image_url 配合的可选尾帧图片。

reference_video_urlstring (URI)

用于动作或场景引导的参考视频。

reference_audio_urlstring (URI)

支持的多模态模式可使用的音频参考。

generate_audioboolean

在所选模式支持时生成同步音频。

可选值: true, false

默认值: true

请求示例

cURL
curl https://aihub-admin.aimix.pro/v1/generations \
  -H "Authorization: Bearer $PIXMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan2.7-video",
  "prompt": "Move naturally from the first composition to the final product lockup",
  "duration": 10,
  "resolution": "1080p",
  "image_url": "https://example.com/first-frame.jpg",
  "last_frame_url": "https://example.com/last-frame.jpg",
  "generate_audio": true
}'
JavaScript
const response = await fetch("https://aihub-admin.aimix.pro/v1/generations", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.PIXMIND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "wan2.7-video",
  "prompt": "Move naturally from the first composition to the final product lockup",
  "duration": 10,
  "resolution": "1080p",
  "image_url": "https://example.com/first-frame.jpg",
  "last_frame_url": "https://example.com/last-frame.jpg",
  "generate_audio": true
})
});

const task = await response.json();

任务受理响应

生成任务为异步处理。请保存响应中的 id,并轮询 GET /v1/generations/{id},直到任务进入终态。

202 Accepted
{
  "id": "img_01JXYZ...",
  "model": "wan2.7-video",
  "status": "processing"
}

API 定价

配置价格
720p$0.120 / second
1080p$0.240 / second

API 使用 apiPlatform 角色独立计费,与 PixMind Studio 积分分开;任务受理响应中的价格快照是最终计费依据。