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"
  }'
ParameterRequiredDescription
modelYesVideo model ID
promptYesText prompt
durationNoDuration; valid range depends on the model
aspect_ratioNoFor example 16:9, 9:16, or 1:1
resolutionNoModel-supported resolution
image_url / imageNoSource image URL for image-to-video models such as bailian/happyhorse-1.0-i2v
reference_image_urlsNoReference image URL array for reference-to-video or video-edit models
video_urlNoSource 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.

Video Generations — Chuizi AI Docs | Chuizi AI