cURL - Keyframe-to-video
Connect a first-frame image and a last-frame image with a smooth transition described by a text prompt.
Billing depends on the resolution tier, duration, and whether audio is generated. Check the model pricing before calling.
For common error codes, see Error messages.
- Model:
pixverse/pixverse-v6-kf2v. - Input images: pass exactly two objects in
input.media: one withtypeset tofirst_frameand one withtypeset tolast_frame. The order does not matter. - Image requirements: each image must be a publicly accessible JPG, PNG, or WEBP file up to 20 MB. The two images can differ in resolution; the output aspect ratio follows the first-frame image.
- Audio: set
audiototrueto generate background music or sound effects that match the video.
Workflow
- Submit a task with this endpoint and save the returned
task_id. - Poll Retrieve task result every 15 seconds until
task_statusisSUCCEEDEDorFAILED.
Billing
Billing depends on the resolution tier, duration, and whether audio is generated. Check the model pricing before calling.
Errors
For common error codes, see Error messages.Authorizations
string
header
required
DashScope API Key. Get one from the QwenCloud console.
Header Parameters
enum<string>
required
Must be set to enable. HTTP requests support asynchronous mode only. Omitting this header returns the error "current user api does not support synchronous calls".
enable
Body
application/jsonenum<string>
required
Model ID. Only pixverse/pixverse-v6-kf2v is supported.
pixverse/pixverse-v6-kf2v
pixverse/pixverse-v6-kf2v
object
required
Basic input information, including the first-frame and last-frame images and the prompt.
object
Video generation parameters, such as resolution, duration, and audio.