NodeKeyNodeKey
AI 模型接口视频(Videos)阿里万相 Wan

阿里万相 Wan 视频生成

阿里通义万相 Wan 视频生成接口。该接口走异步视频任务流程,提交后返回任务 ID,再通过查询接口获取状态和结果。支持文生视频、图生视频;图生视频推荐通过 input_reference 传入首帧图,更多上游 inputparameters 参数可通过 metadata 透传。

POST
/v1/video/generations
AuthorizationBearer <token>

In: header

Request Body

application/json

model*string

阿里万相 Wan 视频模型名称。当前项目适配器支持以上模型。

Value in"wan2.7-i2v-2026-04-25" | "wan2.7-i2v" | "wan2.5-i2v-preview" | "wan2.2-i2v-flash" | "wan2.2-i2v-plus" | "wanx2.1-i2v-plus" | "wanx2.1-i2v-turbo"
prompt*string

视频生成提示词。

input_reference?string

图生视频首帧图 URL 或 Base64;项目会转换为上游 input.img_url

seconds?string

视频时长,字符串格式;项目会转换为上游 parameters.duration

duration?integer

视频时长,整数秒。若同时传 seconds,当前项目优先使用 duration。未传时默认 5 秒。

size?string

分辨率或尺寸。可传 480P720P1080P,或 1280*7201920*1080 这类尺寸;带 * 时作为上游 parameters.size,否则作为 parameters.resolution

metadata?

阿里万相上游扩展参数。适配器会将该对象合并进阿里请求体,支持嵌套 inputparameters。注意项目会强制将 parameters.watermark 置为 false

Response Body

application/json

curl -X POST "https://nodekey.xinghanyun.cn/v1/video/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "wan2.7-i2v-2026-04-25",    "prompt": "手持镜头穿过清晨的咖啡店,阳光从窗边扫过桌面",    "duration": 1,    "metadata": {      "input": {        "negative_prompt": "blurry, low quality",        "audio_url": "https://example.com/audio.mp3"      },      "parameters": {        "ratio": "16:9",        "duration": 1,        "prompt_extend": false,        "audio": false,        "seed": 1,        "watermark": false      }    }  }'
{
  "id": "string",
  "task_id": "string",
  "object": "string",
  "model": "string",
  "status": "queued",
  "progress": 0,
  "created_at": 0
}

最后更新于