Video Generations
POST /v1/videos/generations
Video generation is asynchronous: submit a job, receive an id, then poll GET /v1/videos/{id}. Billing is recorded after the task completes.
Request
terminal
bash
curl -X POST https://api.chuizi.ai/v1/videos/generations \ -H "Authorization: Bearer ck-your-key" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen/wan2.7-t2v", "prompt": "A cinematic city street at night", "duration": 5, "aspect_ratio": "16:9", "resolution": "720p" }'
| Parameter | Required | Description |
|---|---|---|
model | Yes | Video model ID |
prompt | Yes | Text prompt |
duration | No | Duration; valid range depends on the model |
aspect_ratio | No | For example 16:9, 9:16, or 1:1 |
resolution | No | Model-supported resolution |
image_url / image | No | Source image URL for image-to-video models such as bailian/happyhorse-1.0-i2v |
reference_image_urls | No | Reference image URL array for reference-to-video or video-edit models |
video_url | No | Source video URL for video-edit models such as bailian/happyhorse-1.0-video-edit |
HappyHorse Examples
terminal
bash
curl -X POST https://api.chuizi.ai/v1/videos/generations \ -H "Authorization: Bearer ck-your-key" \ -H "Content-Type: application/json" \ -d '{ "model": "bailian/happyhorse-1.0-t2v", "prompt": "A tiny cardboard city comes alive at night", "duration": 5, "aspect_ratio": "16:9", "resolution": "720P", "watermark": false }'
Initial Response
config.json
json
{ "id": "gen-xxxxxxxxxxxxxxxxxxxxxxxx", "status": "processing", "model": "qwen/wan2.7-t2v", "task_id": "upstream-task-id", "created": 1778544000 }
Poll Result
terminal
bash
curl https://api.chuizi.ai/v1/videos/gen-xxxxxxxxxxxxxxxxxxxxxxxx \ -H "Authorization: Bearer ck-your-key"
Status values are processing, succeeded, or failed.