CQTAI
Tencent HunyuanVideo · Video

Image / First-Last Frame VideoNEW

📌 What is this:Given a first-frame image (optionally a last frame too), generate a video that starts from the first frame and transitions toward the last.
💡 When to use:Use to animate an image or to precisely control the opening / closing frames. The aspect ratio follows the first frame; aspectRatio is ignored.

Endpoints

UsageMethodPath
Submit taskPOST/api/cqt/generator/hunyuan
Query ResultGET/api/cqt/info/hunyuan?id={taskId}
⏱ Recommended polling interval:Generation takes ~1-3 min; poll every 10-15s until status = succeeded / failed.

Sub-models

Sub-models that support this mode. The tiers column is credits/sec (generateAudio → = audio tier, videoUrls → = with-reference-video tier). Resolutions / durations not listed are rejected at submit (no charge).

modelUsageMaterialsDuration (sec)Tier price (credits/sec)
hunyuan-video-1.5HunyuanVideo 1.51 first frame + ≤1 last frame5720P=30 / 1080P=50 / 2K=75 / 4K=112

Request Parameters

ParamTypeRequiredDescription
modelstringRequiredSub-model: hunyuan-video-1.5 (see the sub-model table below)
promptstring—Video description (optional; materials can drive generation)
firstFrameUrlstringRequiredFirst-frame image URL (publicly reachable); cannot be combined with imageUrls / videoUrls
lastFrameUrlstring—Last-frame image URL (optional; requires firstFrameUrl, produces a first-to-last transition)
negativePromptstring—Negative prompt (optional)
durationinteger—Duration (sec), range depends on the sub-model (see table), default 5
resolutionstring—540P / 720P / 1080P / 2K / 4K (available tiers depend on the sub-model), default 720P (or the lowest tier if 720P is unavailable); 2K / 4K are upscaled
enhancePromptboolean—Whether to auto-enhance the prompt (optional)
seedinteger—Random seed (optional)
returnFirstFrame / returnLastFrame / returnFrameAtSecondboolean / boolean / number—Also return the first / last / given-second frame image of the result video (optional), 1 credit per frame

Request Example

curl -X POST https://api.cqtai.com/api/cqt/generator/hunyuan \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "hunyuan-video-1.5",
    "prompt": "the red car slowly pulls away and drives down the rainy street, camera follows",
    "duration": 5,
    "resolution": "720P",
    "firstFrameUrl": "https://cdn.novapi.ai/seedream/1791950778488_c22c4d053b2a41fbb28193cd319473b1.jpg",
    "lastFrameUrl": "https://cdn.novapi.ai/seedream/1791950778814_11e964cb95be4866838196e0bc6be7f1.jpg"
  }'
# -> { "code":200, "data":"<taskId>" }

Response Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "73e9945331a142db974be37a048594c0",
    "resultUrl": "https://cdn.novapi.ai/hunyuan/1791952497628_9cee9d757d494452818588d3457bc4f2.mp4",
    "status": "succeeded",
    "errorMsg": null,
    "createTime": "2026-10-14 12:32:47",
    "completeTime": "2026-10-14 12:34:58"
  }
}

Response Fields

FieldTypeDescription
codenumberStatus code; 200 means success
msgstringStatus message; "success" on success
data.idstringTask ID (taskId); use it to poll GET /api/cqt/info
data.statusstringTask status: succeeded / failed / otherwise still processing
data.resultUrlstringURL of the generated video; returned when status = succeeded, null otherwise
data.errorMsgstring | nullFailure reason; null on success
data.createTimestringTask creation time
data.completeTimestring | nullTask completion time; null until finished