Tencent HunyuanVideo · Video

Image / First-Last Frame VideoNEW

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.

This page has been rewritten for the unified API: create with POST /v1/videos, poll with GET /v1/videos/{id}, authenticate with Authorization: Bearer <key>, errors use the OpenAI format. See the video guide for the common parts. Video guide
Submit task
POST/ v1/ videos
Query Result
GET/ v1/ videos/ {id}
Download the video
GET/ v1/ videos/ {id}/ content
⏱ Recommended polling interval:Creating returns a video object right away (status: queued). Poll GET /v1/videos/{id} until status is completed or failed; when done, url is the result address, and you can also download it with GET /v1/videos/{id}/content.

Authorization

AuthorizationstringheaderRequired
API key, sent as a Bearer token in the Authorization header.

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 body

application/json
modelstringRequired
Sub-model: hunyuan-video-1.5 (see the sub-model table below)
promptstring
Video description (optional; materials can drive generation)
firstFrameUrlstringRequired
First-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

model, prompt, seconds, size and input_reference are the common fields of the unified interface. The other fields in the table are specific to this model channel and go in the same request body under their own names. seconds and size (which must be WIDTHxHEIGHT, for example 1280x720) are only translated into channel fields when you did not send the matching channel field yourself.

Response fields

idstring
Task ID, starts with video_; used to query and download.
objectstring
Always video.
modelstring
The model passed when creating.
statusstring
queued, in_progress, completed or failed.
progressinteger
Progress percent; 100 when done.
created_atinteger
Creation time (Unix seconds).
completed_atinteger | null
Completion time; null until finished.
expires_atinteger | null
Expiry time; currently null.
secondsstring
Returned only if seconds was sent when creating.
sizestring
Returned only if size was sent when creating.
errorobject | null
{code, message} on failure; code is video_generation_failed.
urlstring
Extension field: the result address once completed.