Vidu AI Video Generator API documentation
Generate videos with Vidu AI Video Generator (Shengshu Technology). Supports both text and image input modes.
Endpoints
| Contract item | Value |
|---|---|
| Capability | vidu-ai-video-generator |
| Submit | POST https://vidmage.ai/api/v1/vidu-ai-video-generator/submit |
| Query | POST https://vidmage.ai/api/v1/vidu-ai-video-generator/query |
| Task identifier | taskId |
| Result field | videoUrl |
Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.
Product guide: Vidu API
Parameters and input rules
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the video to generate (max 5000 chars). Minimum characters: 1Maximum characters: 5000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image-to-video mode. |
imageUrls | string[] | No | Not specified | Ordered input image URLs for reference-to-video mode. The prompt can reference them by their one-based order. Minimum items: 1Maximum items: 7 |
duration | string | No | "5" | Video duration in seconds. Values: "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" |
aspectRatio | string | No | "16:9" | Output aspect ratio. Values: "4:3", "3:4", "16:9", "9:16", "1:1", "auto" |
resolution | string | No | "720p" | Output resolution tier. Values: "540p", "720p", "1080p" |
sound | boolean | No | false | Generate synchronized audio along with the video. No separate sound surcharge is configured. |
style | string | No | "general" | Choose a general-purpose or anime-oriented visual style. Values: "general", "anime" |
movementAmplitude | string | No | "auto" | Control the overall amount of motion. Values: "auto", "small", "medium", "large" |
text to video
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 1–4000 characters. |
duration | JSON string. Values: "1", "2", "3", "4", "5", "6", "7", "8", "9", "10". Default: 5. |
aspectRatio | Values: "4:3", "3:4", "16:9", "9:16", "1:1". Default: 16:9. |
resolution | Values: "540p", "720p", "1080p". Default: 720p. |
style | Choose a general-purpose or anime-oriented visual style. Values: "general", "anime"Default: "general" |
movementAmplitude | Control the overall amount of motion. Values: "auto", "small", "medium", "large"Default: "auto" |
image to video
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 1–5000 characters. |
duration | JSON string. Values: "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16". Default: 5. |
aspectRatio | Values: "16:9", "9:16", "4:3", "3:4", "1:1", "auto". Default: 16:9. |
resolution | Values: "540p", "720p", "1080p". Default: 720p. |
sound | Boolean. Default: true. |
imageUrls | Up to 7 files. Maximum 50 MB per file. Formats: jpg, jpeg, png, webp. Minimum short edge: 128 px. Aspect ratio range: 0.25–4. |
Example request
{
"prompt": "A glass terrarium grows into a miniature rainforest as the camera slowly circles around it",
"duration": "5",
"aspectRatio": "16:9",
"resolution": "720p",
"style": "general",
"movementAmplitude": "auto"
}# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/vidu-ai-video-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A glass terrarium grows into a miniature rainforest as the camera slowly circles around it","duration":"5","aspectRatio":"16:9","resolution":"720p","style":"general","movementAmplitude":"auto"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Task results and recovery
URL of the generated video. Read videoUrl from the completed query response. Preserve taskId while the task is running.
curl -X POST "https://vidmage.ai/api/v1/vidu-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://..." } }Submission and task queries report the available task and usage information. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.
For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.
Credits
| Component / option | Rate | Minimum |
|---|---|---|
| 540p | 6 credits / second | — |
| 720p | 10 credits / second | — |
| 1080p | 15 credits / second | — |
Base charge = duration × the selected resolution rate.
Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.
