Video / Wan

Wan 2.7 Spicy Video Generation

supported Text-to-Video, first-frame image-to-Video and Reference-to-Video.Create Taskafter returntaskId, can Polling query, can in create when provide Callback URL.

endpointBase URL:https://mm-internal-cn.leonecloud.com

MethodPathDescription
POST/api/v2/open/aigc/wan-2.7-spicyCreate Task
GET/api/v2/open/aigc/{taskId}query task
POST/api/v2/open/aigc/batchQuery Task

Request:Authorization: Bearer <YOUR_API_KEY>; POST useContent-Type: application/json.

Create Task

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.7-spicy" \
 -H "Authorization: Bearer <YOUR_API_KEY>" \
 -H "Content-Type: application/json" \
 -d '{"prompt":"localized example text","resolution":"720p","duration":5,"ratio":"16:9"}'
fieldTypeDescription
promptstringRequired.video.
imageUrlsstring[]first-frame image-to-Videowhen images image URL.
r2vMediaobject[]Reference-to-Videowhen, up to 5.localized example texttype andurl; type can asreference_image, reference_video orfirst_frame.andimageUrls; If omitted as Text-to-Video.
resolutionstring720p (default)or1080p.
durationinteger1–15 seconds, default 5 seconds.Request 16–30 seconds, whenmultiShot andstrictDuration astrue.
ratiostring16:9 (default), 9:16 or1:1.first-frame image-to-Videofirst frame.
negativePromptstringOptional.localized example text.
promptOptimizationbooleanOptional.Prompt, enabled by default.
multiShotbooleanOptional., when exceeds 10 seconds.
strictDurationbooleanOptional.localized example textmultiShot, when default.
callbackUrlstringOptional.taskafter URL.
taskNicknamestringOptional.tasklocalized example text.

Reference-to-VideoRequest Example:

{
 "prompt": "Reference video, Reference image in the",
 "resolution": "720p",
 "duration": 5,
 "r2vMedia": [
 {"type": "reference_image", "url": "https://example.com/sailboat.jpg"},
 {"type": "reference_video", "url": "https://example.com/camera-motion.mp4"}
 ]
}

Query Task

curl "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/<TASK_ID>" \
 -H "Authorization: Bearer <YOUR_API_KEY>"

return{code, msg, data} localized example text.task bookingSuccesswhendata.taskId Task ID; query whendata.status, Successafterdata.result video.query Request Body as{"taskIds":["<TASK_ID>"]}.

Updated 2026-11-23