Skip to main content
First & last frames

PixVerse -- generate a video from first and last frames

Submit a PixVerse V6 keyframe-to-video task

POST
/services/aigc/video-generation/video-synthesis
cURL - Keyframe-to-video
# Singapore (ap-southeast-1). This model is available only in this region.
# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regions
curl --location 'https://ap-southeast-1.maas.qwencloudapi.com/api/v1/services/aigc/video-generation/video-synthesis' \
  -H 'X-DashScope-Async: enable' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "pixverse/pixverse-v6-kf2v",
  "input": {
    "prompt": "The flower bud slowly blooms, the petals open one by one, and the scene ends with a fully open flower.",
    "media": [
      {
        "type": "first_frame",
        "url": "https://example.com/first_frame.png"
      },
      {
        "type": "last_frame",
        "url": "https://example.com/last_frame.png"
      }
    ]
  },
  "parameters": {
    "resolution": "720P",
    "duration": 5,
    "watermark": true
  }
}'
{
  "request_id": "<string>",
  "output": {
    "task_id": "<string>",
    "task_status": "PENDING"
  }
}
Connect a first-frame image and a last-frame image with a smooth transition described by a text prompt.
  • Model: pixverse/pixverse-v6-kf2v.
  • Input images: pass exactly two objects in input.media: one with type set to first_frame and one with type set to last_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 audio to true to generate background music or sound effects that match the video.

Workflow

  1. Submit a task with this endpoint and save the returned task_id.
  2. Poll Retrieve task result every 15 seconds until task_status is SUCCEEDED or FAILED.

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/json
enum<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.

Response

200-application/json
string

Unique request ID, useful for tracing and troubleshooting.

object

Task output.