Documentary realism, dry daylight at a small archaeological dig, one adult female archaeologist in a plain sand-colored field shirt and blue neck scarf. Shot 1 [0-4s]: a wide view of the excavation grid; she kneels beside a shallow tray containing one pottery fragment. Shot 2 [4-10s]: cut to a medium close-up of the SAME woman, gently brushing dust from the fragment, then looking toward a colleague off camera and saying clearly: "This edge belonged to a painted bowl." Preserve her face, clothes and location across the cut. Soft brush sounds, light outdoor breeze, natural synchronized speech. No music, titles, logos or advertising.
Wan 2.6 Text to Video API
alibaba/wan-2.6/text-to-videoWan 2.6 Text to Video transforms natural-language prompts into 5–15 second 1080p high-fidelity videos, featuring multi-shot narrative composition, cinematic camera movement, and expressive scene lighting. It faithfully preserves narrative pacing and real-world physical dynamics while sustaining temporal continuity across complex multi-angle transitions.
Examples
REST API Spec
Quick Start
Submit an endpoint request and poll for status. Replace example URLs with your accessible files.
Step 1: Configure API authentication
Obtain an API key from the dashboard and include Authorization: Bearer <API_KEY> in every request header.
- Submission Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Auth Header
- Authorization: Bearer VIDGO_API_KEY
Step 2: Submit a generation task
POST /api/generate/submit. Pass model and optional callback_url at the root level, with generation parameters inside input.
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-2.6/text-to-video",
"input": {
"prompt": "Documentary realism, dry daylight at a small archaeological dig, one adult female archaeologist in a plain sand-colored field shirt and blue neck scarf. Shot 1 [0-4s]: a wide view of the excavation grid; she kneels beside a shallow tray containing one pottery fragment. Shot 2 [4-10s]: cut to a medium close-up of the SAME woman, gently brushing dust from the fragment, then looking toward a colleague off camera and saying clearly: \"This edge belonged to a painted bowl.\" Preserve her face, clothes and location across the cut. Soft brush sounds, light outdoor breeze, natural synchronized speech. No music, titles, logos or advertising.",
"duration": 10,
"resolution": "720p",
"multi_shots": true
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"Step 3: Poll for task completion
Poll status with task_id; continue while not_started or running, and stop on finished or failed. Read video URLs from data.files[].file_url on success, or data.error_message on failure.
Status Endpoint
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll status using task_id; continue while not_started or running, stop when finished or failed. On success, read data.files[].file_url; on failure, read data.error_message.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "W7R6RD872WMDLW7D",
"status": "running",
"created_time": "2026-09-21T17:09:32"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}Complete end-to-end script example
Expand to view a production-ready script with retry logic, error handling, and timeout safeguards.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan-2.6/text-to-video",
"input": {
"prompt": "Documentary realism, dry daylight at a small archaeological dig, one adult female archaeologist in a plain sand-colored field shirt and blue neck scarf. Shot 1 [0-4s]: a wide view of the excavation grid; she kneels beside a shallow tray containing one pottery fragment. Shot 2 [4-10s]: cut to a medium close-up of the SAME woman, gently brushing dust from the fragment, then looking toward a colleague off camera and saying clearly: \"This edge belonged to a painted bowl.\" Preserve her face, clothes and location across the cut. Soft brush sounds, light outdoor breeze, natural synchronized speech. No music, titles, logos or advertising.",
"duration": 10,
"resolution": "720p",
"multi_shots": true
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneRequest Parameters (input object)
Supported generation parameters inside the input object when submitting a POST request to /api/generate/submit:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | String. Trimmed before validation; 1–5,000 Unicode characters. |
| duration | integer | No | 5 | Integer. Output duration: 5, 10, 15 seconds. |
| resolution | string | No | 720p | Output resolution: 720p or 1080p. |
| multi_shots | boolean | No | — | Optional boolean. Omit to leave the upstream setting unspecified. The playground starts with false. No additional charge. |
Response Fields (query result)
Task details returned when polling GET /api/generate/status/{task_id}:
| Field | Type | Description |
|---|---|---|
| code | integer | Business response code, 200 on success. |
| data.task_id | string | Globally unique asynchronous task identifier. |
| data.status | string | Execution status: not_started, running, finished, or failed. |
| data.files | array | Generated video files upon completion, each with file_url and file_type. |
| data.error_message | string | null | Error description if task fails. |
Task Lifecycle
Clients should inspect the status field and stop polling when reaching finished or failed:
not_startedTask received and queued for execution.
runningGeneration is in progress.
finishedGeneration complete; retrieve video URL from data.files.
failedGeneration failed; inspect data.error_message; deducted credits are refunded per standard policy.
Polling & Error Handling
- Recommended Polling IntervalStart polling every 2–3 seconds, increasing to 5 seconds as the task continues, to avoid excessive requests.
- Network Fluctuations & RetriesIf status polling encounters 5xx or timeouts, the task is still running; retry querying after a brief pause.
- Asynchronous Webhook CallbackProvide callback_url at the root of the request payload to receive the completed task result automatically via POST.
Specifications
| Specification | Value | Description |
|---|---|---|
| Model ID | alibaba/wan-2.6/text-to-video | Send this value in the root-level model field. |
| Duration | 5, 10, 15s | Default is 5 seconds. |
| Resolution | 720p / 1080p | Default is 720p. |
Wan 2.6 Text to Video API Frequently Asked Questions
What is the Wan 2.6 Text to Video API?
Wan 2.6 Text to Video is an Alibaba model for text-to-video generation. It transforms natural-language text prompts into 5–15 second, up to 1080p high-definition dynamic videos with support for cinematic camera movement and multi-shot narrative composition. Built on an advanced Diffusion Transformer spatio-temporal architecture, it faithfully preserves prompt physics and narrative pacing while sustaining scene and subject coherence across angle changes. You can call it programmatically or try it from the playground above.
Can Wan 2.6 Text to Video generate 15-second videos?
Yes. The model supports duration tiers of 5, 10, and 15 seconds, with 5 seconds selected by default. Across a continuous 15-second sequence, it maintains stable lighting and subject morphology while executing multi-stage actions.
Does the multi-shot feature in Wan 2.6 Text to Video cost extra?
No, it carries no extra charge. The multi_shots parameter is an optional boolean; when enabled, the model automatically renders multi-angle cinematography following prompt cues, billed strictly by standard duration and resolution rates.
How do I generate 1080p video with Wan 2.6 Text to Video?
Simply specify 1080p in the resolution parameter. The 1080p tier renders crisp facial micro-expressions, hair textures, and diffuse lighting gradients, making it ideal for high-definition commercial deliverables.
Does Wan 2.6 Text to Video follow camera motion prompts?
Yes. Adding standard camera directions such as slow push-in, orbit shot, or low-angle tracking to your prompt guides the model to execute smooth, cinematic camera paths.
What is the prompt character limit for Wan 2.6 Text to Video?
The prompt parameter accepts 1 to 5,000 Unicode characters after trimming whitespace. It natively supports English and Chinese, offering ample space for detailed scene choreography and visual direction.
Should I use Wan 2.6 Text to Video if I already have reference images?
If you have existing artwork or photo assets, choose the Wan 2.6 Image to Video endpoint instead. Wan 2.6 Text to Video is optimized for text-only creation, whereas Image to Video anchors the initial frame to preserve facial likeness and framing.