ModelsLab/CogVideoX
cogvideoxGenerates 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 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 Name | Parameter | Technical Description |
|---|---|---|
| Prompt | prompt | Text description of the image you want to generate |
| Output Type | output_type | Output video format |
| Model | model_id | Model to use for generation |
| Negative Prompt | negative_prompt | Things you do not want in the generated image |
| Number of Frame | num_frames | Number of frames (fps=16, frames=81 = 5 seconds) |
| num_inference_steps | num_inference_steps | Number of inference steps |
| guidance_scale | guidance_scale | How closely to follow the prompt (1-10) |
| clip_skip | clip_skip | CLIP layers to skip |
| upscale_height | upscale_height | No description available |
| upscale_width | upscale_width | No description available |
| upscale_strength | upscale_strength | No description available |
| upscale_guidance_scale | upscale_guidance_scale | No description available |
| upscale_num_inference_steps | upscale_num_inference_steps | No description available |
| use_improved_sampling | use_improved_sampling | No description available |
| improved_sampling_seed | improved_sampling_seed | No description available |
| fps | fps | Frames per second |