Request

POST /api/v1/video/generate

Headers: X-API-Key: h3k_...

Body:

{
  "prompt": "a golden retriever running in a wheat field",
  "duration": 5,
  "resolution": "480p",
  "model": "t2v"
}

Field notes:

  • model: t2v is text-to-video, r2v is reference-based, i2v is first/last frame, enhance is upscaling.
  • resolution: currently 480p and 768p. Higher resolution looks better but takes longer and costs more.
  • duration: length in seconds. Each resolution has a maximum.
  • For reference media, upload first via /api/v1/upload/presign, then pass the returned IDs in ref_media_ids.

Response

{
  "task_id": "uuid",
  "status": "queued"
}

You get a task ID, not a video. Poll the task until it is completed.

Example

curl -X POST https://api.h3hub.cn/api/v1/video/generate \
  -H "X-API-Key: h3k_xxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"a golden retriever running in a wheat field","duration":5,"resolution":"480p"}'

Next step: use the task_id to poll task status.