The Text To Video (Wan 2.1) API automatically generates high-quality video content based on natural language descriptions. By providing a text prompt, users can leverage the Wan 2.1 model to create a five-second video corresponding to the input description.
taskId.Enum: application/json
Bearer authentication token. Example: Bearer {{APIKey}}.
The text description of the video to be generated. Must be fewer than 1,500 characters.
Specifies the output video resolution. Supported values: 480p, 720p. Default: 480p.
Returns 0 for success, or a specific error code.
Returns "success" or a descriptive error message.
The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.
Use the Polling API to retrieve the processing results.
Alternatively, you can enable Callback to receive task results automatically upon completion.
{
"code": 0,
"message": "success",
"data": {
"task": {
"taskId": "aa80298fbc2c46d78fd35c9d82d518c0",
"status": 3,
"executionTime": 32520,
"expire": 1756974988050,
"taskType": "wan/text_to_video/2.1"
},
"videos": [
{
"videoType": "mp4",
"videoUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/dreamapi/o/2025-09-02/a53c5f7cc6ee454da471150b996ebde1.mp4"
}
]
}
}curl -X POST 'https://api.newportai.com/api/async/wan/text_to_video/2.1' \
-H "Authorization: Bearer {{key}}" \
-H 'Content-Type: application/json' \
-d '{
"prompt":"Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage.",
"resolution":"480p"
}'{
"code": 0,
"message": "success",
"data": {
"taskId": "aa80298fbc2c46d78fd35c9d82d518c0"
}
}