Skip to main content
POST
Reference-to-video: create a video task that preserves subject features from reference images/videos
The Playground on the right lets you debug directly: put Bearer sk-your-api-key in Authorization, fill in model / input.media / parameters, and send the request. A successful submission returns a task_id; see below for polling and download.
This page is the creation endpoint for wan2.7-r2v (reference-to-video): give reference images/videos and the model preserves their subjects (people/animals/objects) and scene features, generating single-character performances or multi-character interactions. If you need more reference images (up to 9), consider HappyHorse r2v. For the full async flow, see the Wan Overview.
  • Reference-asset citation convention: in the prompt, use “image 1 / image 2” to refer to reference_image and “video 1 / video 2” to refer to reference_video, in the same order as the media array (images and videos counted separately). With a single image/video, you can simply write “the reference image” / “the reference video”.
  • Count limits: reference_image + reference_video total ≤5; at most 1 first_frame.
  • Creation requests go to /wan/api/v1/... with X-DashScope-Async: enable; do not use /v1/videos.

Code examples

Parameter and media quick reference

media[] values

Response format

Check status and download

Once you have the task_id, follow these three steps to poll status and download the mp4:
  • Poll GET /v1/tasks/{task_id} (with Authorization; the query does not need the X-DashScope-Async header), every 10 seconds (not < 3 seconds), until status becomes completed. Reference-to-video usually takes 1-5 minutes, so set a 20-minute client timeout as a fallback.
  • Status values: submitted (queued) / in_progress (generating; progress often sitting at 30% is normal) / completed (success) / failed (check error).
  • Download: GET the result_url from the response directly, without the Authorization header (it is an OSS signed direct link — sending Auth returns 403); result_url expires in 24 hours by default, so save it promptly.
The above is the quick check/download path for “already have a task_id”. For the full polling loop (with timeout fallback) and Python client, see Wan Overview · Async call flow.

Authorizations

Authorization
string
header
required

The API Key obtained from the APIYI console

Headers

X-DashScope-Async
enum<string>
default:enable
required

Async processing switch; must be set to enable

Available options:
enable

Body

application/json
model
enum<string>
default:wan2.7-r2v
required

Model ID; for reference-to-video use wan2.7-r2v (legacy versions wan2.6-r2v / wan2.6-r2v-flash)

Available options:
wan2.7-r2v,
wan2.6-r2v,
wan2.6-r2v-flash
input
object
required
parameters
object

Response

Task submitted; returns task_id and PENDING status

output
object
request_id
string

Unique request identifier

Example:

"..."