wan2.7
提交 Alibaba Wan 2.7 异步视频生成任务。单一模型 ID wan2.7,模式(text-to-video / image-to-video / video-continuation)由请求中的 image / images / image_with_roles / video_urls 自动判定。返回 task_id 后通过状态查询接口轮询直到 status=finished。
Authorization
BearerAuth
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
固定值 wan2.7。模式(text / image / video-continuation)由请求中的媒体输入自动判定。
"wan2.7"视频描述,最多 5000 字符。Text-to-Video 必填;带媒体输入(image / images / image_with_roles / video_urls)时可省。
视频比例,默认 16:9。
"16:9" | "9:16" | "1:1" | "4:3" | "3:4"视频时长,单位为秒。范围 2..15,默认 5。
2 <= value <= 15参考图 URL 列表,1~2 张。2 张时第 1 张为首帧、第 2 张为尾帧。与 image_with_roles 互斥。
items <= 2视频清晰度,默认 1080P。
"720P" | "1080P"不希望出现的内容描述,最多 500 字符。
背景 / 驱动音频 URL,格式 wav / mp3,时长 2~30 秒,大小 ≤15MB。
是否启用智能提示词改写,默认 true。
是否给生成视频打上 "AI Generated" 水印,默认 false。
随机种子,≥0,用于复现。
0 <= value带角色的参考图列表,与 images 互斥。
"first_frame" | "last_frame"视频续帧使用的输入视频 URL,只支持 1 个。
items <= 1任务终态时由平台主动 POST 的 HTTPS 回调地址(可选)。
uriResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.apimp.ai/api/generate/submit" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7", "prompt": "A samurai cat walking through neon Tokyo, cinematic lighting" }'{
"code": 200,
"data": {
"task_id": "task_2BvCWmHzG6sJxK4tQpAr8M9nZyYfRdLs",
"status": "not_started",
"created_time": "2026-06-27T09:21:26",
"error_message": null
}
}{
"code": 400,
"error": {
"message": "prompt is required unless `image`, `images`, `image_with_roles`, or `video_urls` is provided",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}这篇文档对您有帮助吗?
最后更新于