Skip to main content
POST
Text-to-video: create a video generation task from a text prompt
The Playground on the right lets you debug directly: put Bearer sk-your-api-key in Authorization, fill in model / input / parameters, and send the request. A successful submission returns a task_id; see below for polling and download.
This page is the creation endpoint for wan2.7-t2v (text-to-video). It needs only a text prompt, no media. To make an image move or preserve subject features, use Image-to-Video / Reference-to-Video instead. For the full async flow, status table, and Python client, see the Wan Overview.
  • Creation requests must go to /wan/api/v1/services/aigc/video-generation/video-synthesis with the header X-DashScope-Async: enable. Do not use /v1/videos.
  • duration must be an integer (5, not "5"); write resolution in uppercase (720P).

Code examples

Parameter quick reference

Response format

A successful creation returns a task_id (not the video itself):

Check status and download

Once you have the task_id, follow these three steps to poll status and download the mp4:
  • Poll GET /v1/tasks/{task_id} (with Authorization; the query does not need the X-DashScope-Async header), every 5-10 seconds (not < 3 seconds), until status becomes completed.
  • Status values: submitted (queued) / in_progress (generating; progress often sitting at 30% is normal) / completed (success) / failed (check error).
  • Download: GET the result_url from the response directly, without the Authorization header (it is an OSS signed direct link — sending Auth returns 403); result_url expires in 24 hours by default, so save it promptly.
The above is the quick check/download path for “already have a task_id”. For the full polling loop (with timeout fallback) and Python client, see Wan Overview · Async call flow.

Authorizations

Authorization
string
header
required

The API Key obtained from the APIYI console

Headers

X-DashScope-Async
enum<string>
default:enable
required

Async processing switch; must be set to enable, otherwise it returns current user api does not support synchronous calls

Available options:
enable

Body

application/json
model
enum<string>
default:wan2.7-t2v
required

Model ID; for text-to-video, fixed wan2.7-t2v (legacy version wan2.6-t2v)

Available options:
wan2.7-t2v,
wan2.6-t2v
input
object
required
parameters
object

Response

Task submitted; returns task_id and PENDING status

output
object
request_id
string

Unique request identifier; provide it to support when troubleshooting

Example:

"a23b81b0-0c05-9972-a6c9-ee757400afdb"