🎉 New Year Sale: Get 20% OFF on all plans — Use code NEWYEAR2026.

Upgrade now
CogVideoX thumbnail

ModelsLab/CogVideoX

cogvideox
Text to Video (Fast)Free for Premium UsersLLMs.txt
Generates coherent text-to-video content at 720x480 resolution, 8 FPS, with up to 6-second clips, leveraging diffusion transformers and efficient 3D variational autoencoding for smooth motion and semantic alignment.
API PlaygroundAPI Documentation

API Endpoint URL

Base URL for all API requests to this endpoint.

https://modelslab.com/api/v6/video/text2video

API Authentication

Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.

Integration Examples

Production-ready code samples for API integration

{
"prompt": "A suited astronaut, with the red dust of Mars clinging to their boots, reaches out to shake hands with an alien being, their skin a shimmering blue, under the pink-tinged sky of the fourth planet. In the background, a sleek silver rocket, a beacon of human ingenuity, stands tall, its engines powered down, as the two representatives of different worlds exchange a historic greeting amidst the desolate beauty of the Martian landscape.",
"output_type": "mp4",
"model_id": "cogvideox",
"negative_prompt": "blurry, low quality, distorted, extra limbs, missing limbs, broken fingers, deformed, glitch, artifacts, unrealistic, low resolution, bad anatomy, duplicate, cropped, watermark, text, logo, jpeg artifacts, noisy, oversaturated, underexposed, overexposed, flicker, unstable motion, motion blur, stretched, mutated, out of frame, bad proportions",
"num_frames": "16",
"num_inference_steps": "35",
"guidance_scale": "7.5",
"clip_skip": "2",
"upscale_height": "1024",
"upscale_width": "1024",
"upscale_strength": "0.7",
"upscale_guidance_scale": "6.5",
"upscale_num_inference_steps": "40",
"use_improved_sampling": true,
"improved_sampling_seed": "42",
"fps": "16",
"key": "YOUR_API_KEY"
}

SDKs

Official SDKs

Production-ready SDKs and client libraries for all major programming languages

API Parameters

Technical specifications for API request parameters.

Field NameParameterTechnical Description
Prompt promptText description of the image you want to generate
Output Typeoutput_typeOutput video format
Modelmodel_idModel to use for generation
Negative Promptnegative_promptThings you do not want in the generated image
Number of Framenum_framesNumber of frames (fps=16, frames=81 = 5 seconds)
num_inference_stepsnum_inference_stepsNumber of inference steps
guidance_scaleguidance_scaleHow closely to follow the prompt (1-10)
clip_skipclip_skipCLIP layers to skip
upscale_heightupscale_heightNo description available
upscale_widthupscale_widthNo description available
upscale_strengthupscale_strengthNo description available
upscale_guidance_scaleupscale_guidance_scaleNo description available
upscale_num_inference_stepsupscale_num_inference_stepsNo description available
use_improved_samplinguse_improved_samplingNo description available
improved_sampling_seedimproved_sampling_seedNo description available
fpsfpsFrames per second