Text-to-Video
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Asynchronous processing configuration parameters. HTTP requests only support asynchronous processing and must be set to enable.
Request Body
application/json
Model name, fixed value: happyhorse-1.0-t2v
Basic input information, such as prompts.
Text prompt used to describe the desired video content. Supports input in any language, up to 5,000 non-Chinese characters or 2,500 Chinese characters in length; any excess will be automatically truncated.
Video processing parameters, such as setting video resolution and video duration.
Video resolution, supported: 720P, 1080P (default)
Video aspect ratio, default 16:9, supported: 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9
Video duration in seconds, an integer in the range [3, 15], default 5
Whether to add a watermark to the generated video. The watermark is located in the bottom-right corner of the video, with the fixed text "Happy Horse". true: Default value, add watermark. false: Do not add watermark.
Random seed, with a value range of [0, 2147483647]. If not specified, the system automatically generates a random seed. To improve the reproducibility of the generated results, it is recommended to use a fixed seed value. Please note that due to the probabilistic nature of model generation, exact consistency of the generated results cannot be guaranteed every time even when using the same seed.
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Number of Images
Video Duration in Seconds
Input Token Count
Total Tokens
Output Token Count
Validity Period
Task ID
Task Status
Status Information
Request ID
curl -X POST "https://api.ygw.ai/api/v1/video/generation" \ -H "Authorization: string" \ -H "X-DashScope-Async: string" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "input": {}, "parameters": {} }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}