Text-to-Video 2.7
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Configuration parameters for asynchronous processing. HTTP requests only support asynchronous processing and must be set to enable.
Request Body
application/json
Model name, fixed value: wan2.7-t2v
"wan2.7-t2v"Basic input information, such as prompts.
Text prompt. Used to describe the desired elements and visual characteristics to be included in the generated image. Supports both Chinese and English, where each Chinese character or letter counts as one character, and any excess is automatically truncated. Length limits vary by model version: wan2.7-t2v: up to 5,000 characters.
Negative prompts are used to describe unwanted content in the video frames, allowing you to restrict the visual output. Supports both Chinese and English, with a maximum length of 500 characters; any excess will be automatically truncated. Example values: low resolution, errors, worst quality, low quality, deformed, extra fingers, bad proportions, etc.
The URL of the audio file, which the model will use to generate a video.
Video processing parameters, such as setting video resolution, setting video duration, enabling intelligent prompt rewriting, and adding watermarks.
Resolution tier for the generated video, used to control video clarity (total pixels). wan2.7-t2v: Valid values: 720P, 1080P. Default value: 1080P.
Aspect ratio of the generated video. 16:9 (default) 9:16 1:1 4:3 3:4 Output video resolutions for different aspect ratios (width and height in pixels) 720P: 16:9: 1280720 9:16: 7201280 1:1: 960960 4:3: 1104832 3:4: 8321104 1080P 16:9: 19201080 9:16: 10801920 1:1: 14401440 4:3: 16481248 3:4: 12481648
Duration of the generated video, in seconds. wan2.7-t2v: An integer in the range [2, 15]. The default value is 5.
Whether to enable intelligent prompt rewriting. When enabled, a large model intelligently rewrites the input prompt. This significantly improves generation quality for shorter prompts but increases latency. true: Default value, enables intelligent rewriting. false: Disables intelligent rewriting.
Specifies whether to add a watermark. The watermark is located in the bottom right corner of the video with the fixed text AI-generated. false: Default value, no watermark is added. true: Add a watermark.
Random seed, with a value range of [0, 2147483647].
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Image Count
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": "wan2.7-t2v", "input": { "prompt": "string" }, "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"
}