Image-to-Video
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed value i2v
Model name, supported: minimax-hailuo-2.3, minimax-hailuo-2.3-fast
Image information; the first frame is required for flyer images. It must include the imageUrl field (image URL, must be publicly accessible). The image size must be less than 20MB. Supported formats include JPG/JPEG/PNG/WebP. The shorter side must be greater than 300px, and the aspect ratio must be between 2:5 and 5:2.
Image Link
First and last frame image information (supported only by minimax-hailuo-02), where the last frame image is required. Includes headImage.imageUrl (first frame image) and tailImage.imageUrl (last frame image).
First Frame Image Information
Image Link
Last Frame Image Information
Image Link
Prompt, up to 2000 characters
Video resolution, supported: 768p (default), 1080p (6s only)
Video resolution, supported: 768p (default), 1080p (6s only)
Whether to automatically optimize the prompt, defaults to true
Whether to shorten the optimization time for prompt_optimizer, defaults to false. This parameter takes effect only when the image parameter is passed.
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
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 "Content-Type: application/json" \ -d '{ "_action": "string", "model": "string", "image": { "imageUrl": "string" }, "headtailImages": {} }'{
"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"
}