Make sure you add your s3 details for video server, so you can receive video generated in your bucket. videos generated without s3 details being added will be delete after 24 hours

Request

curl
--request POST 'https://modelslab.com/api/v1/enterprise/video/text2video' \

Body Attributes

Attributes

key
string
required
Your unique API key used for authorization.
model_id
string
required
The ID of the model to use. Allowed values: cogvideox.
prompt
string
required
The text prompt describing the content you want in the generated video.
negative_prompt
string
Items you do not want in the video.
seed
integer
The seed used to reproduce results. Pass null for a random number.
height
integer
default:"512"
The height of the video. Maximum: 512 pixels.
width
integer
default:"512"
The width of the video. Maximum: 512 pixels.
num_frames
integer
default:"16"
The number of frames in the generated video. Default: 16, Maximum: 25.
num_inference_steps
integer
default:"20"
The number of denoising steps. Default: 20, Maximum: 50.
guidance_scale
number
default:"7.5"
The scale for classifier-free guidance. Range: 0–8.
clip_skip
integer
The number of CLIP layers to skip. A value of 2 leads to more aesthetic results. Default: null.
upscale_height
integer
default:"1024"
The height to upscale the video to when using the zeroscope model. Default: 1024.
upscale_width
integer
default:"1024"
The width to upscale the video to when using the zeroscope model. Default: 1024.
upscale_strength
number
default:"0.5"
The strength for upscaling. Higher strength can lead to more differences between the generated and upscaled video.
upscale_guidance_scale
number
default:"7.5"
The guidance scale for upscaling the video when using the zeroscope model.
upscale_num_inference_steps
integer
default:"20"
The number of denoising steps for upscaling the video when using the zeroscope model. Default: 20.
use_improved_sampling
boolean
default:"false"
Whether to use an improved sampling technique. Leads to better results with higher temporal consistency at the cost of slower performance.
improved_sampling_seed
integer
The seed for consistent video generation when using the improved sampling technique.
fps
integer
default:"8"
The frames per second rate of the generated video. Maximum: 16.
output_type
string
default:"mp4"
The output type of the video. Options: mp4 or gif.
instant_response
boolean
default:"false"
If true, returns an instant response with future links for queued requests instead of waiting for processing.
temp
boolean
default:"false"
If true, stores generations in temporary storage. Temporary files are cleaned every 24 hours.
webhook
string
Provide a URL to receive a POST API call once the video generation is complete.

Body

json
{    
  "key":"enterprise_api_key",    
  "model_id":"cogvideox",    
  "prompt":"Space Station in space.",    
  "negative_prompt":"low quality",    
  "height":512,    
  "width":512,    
  "num_frames":16,    
  "num_inference_steps":20,    
  "guidance_scale":7,    
  "upscale_height":1024,    
  "upscale_width":1024,    
  "upscale_strength":0.6,    
  "upscale_guidance_scale":8,    
  "upscale_num_inference_steps":20,    
  "output_type":"gif",    
  "webhook":null,    
  "track_id":null
}