Full-body portrait-format shot of one adult contemporary dancer in a flowing deep burgundy skirt in a quiet sunlit rehearsal studio with a wooden floor and tall windows, no mirrors. She makes one slow graceful turn on the spot, then settles into a balanced standing pose as the skirt falls naturally around her legs. Her feet remain in contact with the floor and her arms move gently with the turn. Locked camera, entire body and feet always visible, soft daylight, realistic anatomy, one continuous shot, no other people, no text or logos.
Wan 2.2 Fast Text to Video API
alibaba/wan/v2.2-a14b/text-to-video/turboWan 2.2 Fast Text to Video transforms natural language prompts into fluid, cinematic video clips across 480p and 720p resolutions with rapid generation speed and flexible widescreen and portrait aspect ratios. It accurately interprets complex scene descriptions and camera motion cues while maintaining physical consistency and temporal coherence throughout the sequence.
530/800
Examples
REST API Reference
Quick Start
Submit a task, then query its result using task_id.
Step 1: Set up authentication
Create an API key in the dashboard and attach Authorization: Bearer <API_KEY> when submitting a task.
- Submit Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authorization Header
- Authorization: Bearer VIDGO_API_KEY
Step 2: Submit a task
POST /api/generate/submit: alibaba/wan/v2.2-a14b/text-to-video/turbo
REQUEST_BODY=$(cat <<'JSON'
{
"model": "alibaba/wan/v2.2-a14b/text-to-video/turbo",
"input": {
"prompt": "A cinematic wide shot of one vintage steam train traveling steadily from left to right across a stone viaduct above a lush tropical gorge. The camera tracks sideways smoothly at the train's speed. White steam trails behind the locomotive, drifting over the dense green canopy; a distant waterfall and soft morning mist create layers of depth. The wheels remain on the rails, the carriages stay connected, and the bridge stays rigid. Natural documentary realism, warm early sunlight, one continuous shot, no cuts, no text or logos.",
"resolution": "720p",
"seed": 22400,
"aspect_ratio": "16:9"
}
}
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 completion
Poll with task_id while status is not_started or running, and stop at finished or failed. On success, read data.files[].file_url; on failure, read data.error_message.
Status Endpoint
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll with task_id while status is not_started or running, and stop at finished or failed. On success, read data.files[].file_url; on failure, read data.error_message.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "NSUM0A8GZ7VG20YS",
"status": "running",
"created_time": "2026-09-24T16:47:41"
}
}{
"code": 200,
"data": {
"task_id": "NSUM0A8GZ7VG20YS",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/alibaba/wan/v2.2-a14b/text-to-video/turbo/v1/01/output.mp4",
"file_type": "video"
}
],
"created_time": "2026-09-24T16:47:41",
"error_message": null,
"progress": 100
}
}Complete executable script
Expand to review an end-to-end script with automatic polling, 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/v2.2-a14b/text-to-video/turbo",
"input": {
"prompt": "A cinematic wide shot of one vintage steam train traveling steadily from left to right across a stone viaduct above a lush tropical gorge. The camera tracks sideways smoothly at the train's speed. White steam trails behind the locomotive, drifting over the dense green canopy; a distant waterfall and soft morning mist create layers of depth. The wheels remain on the rails, the carriages stay connected, and the bridge stays rigid. Natural documentary realism, warm early sunlight, one continuous shot, no cuts, no text or logos.",
"resolution": "720p",
"seed": 22400,
"aspect_ratio": "16:9"
}
}
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)
Place generation parameters in input, with model and optional callback_url at the request root. Use standard JSON types; unsupported input fields are rejected.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | - | Required non-empty string, up to 800 Unicode characters after trimming surrounding whitespace. |
| aspect_ratio | string | No | 16:9 | Output aspect ratio: 16:9 or 9:16. |
| resolution | string | No | 720p | Output resolution: 480p or 720p. |
| seed | integer | No | - | Optional random seed for reproducibility. |
Response Fields (Status Query)
Details returned by GET /api/generate/status/{task_id}:
| Field | Type | Description |
|---|---|---|
| code | integer | HTTP/business response status code (200 indicates success). |
| data.task_id | string | Globally unique task identifier. |
| data.status | string | Task lifecycle state: not_started, running, finished, or failed. |
| data.files | array | Array of output assets containing file_url and file_type upon completion. |
| data.error_message | string | null | Error diagnostic details if the task status is failed. |
Task Lifecycle
Clients should poll status until reaching either the finished or failed terminal state:
not_startedQueued
runningGenerating
finishedReady
failedFailed
Polling & Error Handling
- Polling frequencyBegin polling status 2 to 3 seconds after submission, using a 3-second interval until the task enters finished or failed.
- Network resiliencyTransient HTTP 5xx errors or network timeouts during status queries do not indicate generation failure; retry status requests safely.
- Webhook callbacksSpecify an optional top-level callback_url in your JSON submission payload to receive an automated notification when the task concludes.
Specifications
| Specification | Value | Description |
|---|---|---|
| Model | alibaba/wan/v2.2-a14b/text-to-video/turbo | |
| Resolution | 480p / 720p | Default: 720p |
| Pricing | 480p: $0.030 · 720p: $0.060 | 6 / 12 credits per generation |
Related Models
Wan 2.2 Fast Text to Video API frequently asked questions
What is the Wan 2.2 Fast Text to Video API?
Wan 2.2 Fast Text to Video is an Alibaba model for text-to-video generation. It transforms natural language text prompts into fluid, cinematic video clips across 480p and 720p resolutions in both 16:9 widescreen and 9:16 portrait aspect ratios with rapid generation speed. You can call it programmatically or try it from the playground above.
What output resolutions are available in Wan 2.2 Fast Text to Video?
Wan 2.2 Fast Text to Video supports two output resolutions: 480p and 720p. The 480p option is ideal for fast prototyping and high-volume generation, while 720p delivers sharper detail and richer environmental textures suitable for final digital publication.
What aspect ratios does Wan 2.2 Fast Text to Video support?
Wan 2.2 Fast Text to Video supports two aspect ratios: standard 16:9 for widescreen desktop and landscape displays, and 9:16 for vertical mobile platforms including TikTok, Instagram Reels, and YouTube Shorts. You can configure this via the aspect_ratio parameter.
What is the prompt length limit for Wan 2.2 Fast Text to Video?
The prompt parameter accepts up to 800 Unicode characters after trimming leading and trailing whitespace. Prompts exceeding 800 characters are rejected with an HTTP 400 validation error, so prioritize descriptive scene cues, lighting directions, and camera actions within this budget.
How much does Wan 2.2 Fast Text to Video cost?
Pricing is calculated per completed generation based on resolution: 480p costs 6 credits ($0.030), and 720p costs 12 credits ($0.060). Credits are deducted upon submission and refunded automatically if generation terminates in a failed state.
How can you use the seed parameter in Wan 2.2 Fast Text to Video?
Passing an optional integer in the seed parameter allows you to maintain reproducible compositions and stylistic patterns across runs with the same prompt and aspect ratio. Omitting seed produces fresh random generations on each call.
What are the key differences between Wan 2.2 Fast and other Wan models?
Wan 2.2 Fast is optimized for high generation speed and cost efficiency for 480p and 720p video generation. Standard Wan models such as Wan 2.6 or Wan 2.7 prioritize multi-shot narrative control and 1080p outputs at higher compute tiers.
How do you retrieve videos from the Wan 2.2 Fast Text to Video API?
Submit a request to POST /api/generate/submit and read the returned task_id. While the status is not_started or running, poll GET /api/generate/status/{task_id}; stop at finished or failed. On success, read the video URLs from data.files[].file_url. On failure, read data.error_message.















