Text-to-Video
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed Value t2v
Model name, supported: minimax-hailuo-02 minimax-hailuo-2.3
Generated prompt text, maximum length 2000 characters
Video duration in seconds, where available values depend on the resolution. Supported values: 6 (default), 10.
Resolution, supported: 768p (default), 1080p (6s only)
Whether to automatically optimize the prompt, defaults to true
Whether to reduce the optimization time of prompt_optimizer, default is false.
Whether to add a watermark to the generated video, defaults to false
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 "Content-Type: application/json" \ -d '{ "_action": "string", "prompt": "string" }'{
"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"
}