Wan AI Video Generator
POST /api/v1/wan-ai-video-generator/submit
Required inputs
Required inputs depend on the selected mode. Check the mode rules below before submitting.
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/wan-ai-video-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A slow crane shot rises above an ancient riverside town as lanterns illuminate the evening mist","duration":"5","aspectRatio":"16:9","resolution":"720p","promptExtend":true}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules13 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | No | Not specified | Text prompt describing the video to generate (max 5000 chars). Optional only in provider modes whose image input fully defines the generation. Maximum length: 5000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image-to-video mode. In that mode, output ratio is inferred from the input image. No additional field constraint listed. |
imageUrls | string[] | No | Not specified | Optional multimodal reference images. Public URLs only; images and videos together are limited to 5. Maximum items: 5 |
videoUrls | string[] | No | Not specified | Optional multimodal reference videos. Images and videos together are limited to 5. Maximum items: 5 |
audioUrls | string[] | No | Not specified | Optional multimodal reference audio.. Maximum items: 1 |
lastFrameUrl | string | No | Not specified | Optional public URL for the final frame in image-to-video mode. No additional field constraint listed. |
duration | string | No | "5" | Video duration in seconds. Values: "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" · Default: "5" |
aspectRatio | string | No | "16:9" | Output aspect ratio for modes that expose a ratio parameter. Ignored when imageUrl selects a mode whose ratio is inferred from the input image. Values: "16:9", "9:16", "1:1", "4:3", "3:4" · Default: "16:9" |
resolution | string | No | "720p" | Output resolution tier. Values: "720p", "1080p" · Default: "720p" |
audioUrl | string | No | Not specified | Optional background music or audio track. No additional field constraint listed. |
negativePrompt | string | No | Not specified | Describe unwanted video content or artifacts. Minimum length: 0 · Maximum length: 500 |
promptExtend | boolean | No | true | Rewrite and enrich the prompt automatically. Default: true |
seed | number | No | Not specified | Random seed; leave unset for a random result. Minimum: 0 · Maximum: 2147483647 · Multiple of: 1 · Whole numbers only |
Mode-specific fields & media limits
Text To Video rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 5000 characters |
duration | Values: "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"; mode default: "5" |
aspectRatio | Values: "16:9", "9:16", "1:1", "4:3", "3:4"; mode default: "16:9" |
resolution | Values: "720p", "1080p"; mode default: "720p" |
audioUrl | No additional field constraint listed. |
negativePrompt | Maximum characters: 500 |
promptExtend | Default: true |
seed | Range: 0 to 2147483647 |
Image To Video rules
| Control | Mode-specific rule |
|---|---|
prompt | Optional; minimum 0 characters; maximum 5000 characters |
duration | Values: "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"; mode default: "5" |
resolution | Values: "720p", "1080p"; mode default: "720p" |
imageUrl | Image input |
lastFrameUrl | Optional final-frame image input |
audioUrl | No additional field constraint listed. |
negativePrompt | Maximum characters: 500 |
promptExtend | Default: true |
seed | Range: 0 to 2147483647 |
Multimodal Video rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 5000 characters |
duration | Values: "2", "3", "4", "5", "6", "7", "8", "9", "10"; mode default: "5" |
aspectRatio | Values: "16:9", "9:16", "1:1", "4:3", "3:4"; mode default: "16:9" |
resolution | Values: "720p", "1080p"; mode default: "1080p" |
imageUrls | Image input; up to 5 items |
videoUrls | Video references; up to 5 items |
audioUrls | Audio references; up to 1 items |
negativePrompt | Maximum characters: 500 |
promptExtend | Default: true |
seed | Range: 0 to 2147483647 |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/wan-ai-video-generator/query
Use the same Bearer API key. On completion, read the videoUrl result field.
curl -X POST "https://vidmage.ai/api/v1/wan-ai-video-generator/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "videoUrl": "https://..." } }