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:t2vis text-to-video,r2vis reference-based,i2vis first/last frame,enhanceis upscaling.resolution: currently480pand768p. 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 inref_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.