Video Generations
POST /v1/videos/generations
Generate videos from text prompts asynchronously -- submit a request, receive a task ID, and poll for the completed video.
Request
POST https://api.chuizi.ai/v1/videos/generations
Authentication
Authorization: Bearer ck-your-api-key
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model name, e.g. minimax/video-01, kling/kling-v2 |
prompt | string | Yes | — | Text description of the video to generate |
duration | integer | No | 5 | Video duration in seconds (model dependent, typically 2-10) |
aspect_ratio | string | No | "16:9" | Aspect ratio: 16:9, 9:16, 1:1 |
resolution | string | No | "720p" | Video resolution: 480p, 720p, 1080p |
image | string | No | — | Base64-encoded reference image for image-to-video generation |
Request Example
config.json
json
{ "model": "minimax/video-01", "prompt": "A golden retriever running through a field of wildflowers in slow motion", "duration": 5, "aspect_ratio": "16:9", "resolution": "720p" }
Response
Initial Response (Task Created)
config.json
json
{ "id": "gen-xxxxxxxxxxxxxxxx", "status": "processing", "created": 1712000000, "model": "minimax/video-01", "x_chuizi": { "generation_id": "gen-xxxxxxxxxxxxxxxx" } }
Code Examples
terminal
bash
# Step 1: Submit generation request TASK=$(curl -s -X POST https://api.chuizi.ai/v1/videos/generations \ -H "Authorization: Bearer ck-your-key" \ -H "Content-Type: application/json" \ -d '{ "model": "minimax/video-01", "prompt": "A golden retriever running through wildflowers" }') ID=$(echo $TASK | jq -r '.id') # Step 2: Poll for result curl -s https://api.chuizi.ai/v1/videos/$ID \ -H "Authorization: Bearer ck-your-key"
Next Steps
- Video Generation Guide — prompt tips and model comparison
- Image Generations API — generate still images from text
- Pricing — video generation costs per model