Generate Video
Overview
You can generate a video using the AI/ML API. In the basic setup, you need a prompt and an image URL.
post
/v2/generate/video/minimax/generation
Authorizations
Body
promptstringrequired
Description of the video
prompt_optimizerboolean
The model will automatically optimize the incoming prompt to improve the generation quality If necessary. For more precise control, this parameter can be set to False, and the model will follow the instructions more strictly. At this time It is recommended to provide finer prompts for best results.
first_frame_imagestring uri
The model will use the image passed in this parameter as the first frame to generate a video.
Supported formats:
- URL of the image
- base64 encoding of the image
Image specifications:
- format must be JPG, JPEG, or PNG;
- aspect ratio should be greater than 2:5 and less than 5:2; the shorter side must exceed 300 pixels
- file size must not exceed 20MB.
modelenumrequired
Model id
Options:
video-01
, video-01-live2d
Responses
application/json
cURL
JavaScript
Python
HTTP
default
Example: Create video based on first frame and prompt
Ensure you replace "my_key"
with your actual API key before running the code.
Last updated
Was this helpful?