Skip to main content
POST
Text-to-Video: create a video generation task from a text prompt
You can debug directly in the Playground on the right: fill in Authorization with Bearer sk-your-api-key, set model / input / parameters, then send the request. A successful submission returns a task_id; see below for polling and downloading.
This page covers the create endpoint for happyhorse-1.1-t2v (Text-to-Video) and needs only a text prompt. For the complete async flow, status table, and Python client, see the HappyHorse Overview.
  • The create request must go to /wan/api/v1/services/aigc/video-generation/video-synthesis with the request 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):
After submission, you must poll GET /v1/tasks/{task_id} until status: "completed", then download the mp4 from the result_url in the response. When downloading, do not include the Authorization header (it’s a signed OSS direct link), and result_url expires in 24 hours by default. See the full polling loop in HappyHorse 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

Available options:
enable

Body

application/json
model
enum<string>
default:happyhorse-1.1-t2v
required

Model ID, fixed to happyhorse-1.1-t2v for Text-to-Video

Available options:
happyhorse-1.1-t2v
input
object
required
parameters
object

Response

Task submitted, returns task_id and PENDING status

output
object
request_id
string

Unique request identifier

Example:

"..."