WAN 2.7 Reference-to-Video turns character, prop, or scene references from images or videos into new video shots with preserved identity, style, and layout plus smooth, coherent motion. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
Idle
$0.5per run·~20 / $10
The characters in Video 1 and Video 2 are sitting in front of the TV and playing video games together.
Wan 2.7 Reference-to-Video generates new video scenes guided by reference videos and an optional reference image, maintaining consistent characters, styles, and visual identity. Upload one or more reference videos, describe the scene you want, and the model produces a coherent, character-consistent video that brings your references into a new context.
Multi-video reference support Upload multiple reference videos to combine characters or visual elements from different sources into a single new scene.
Character-consistent generation The model preserves the identity, appearance, and style of characters from your reference videos throughout the generated clip.
Optional reference image Provide an additional still image to further guide the visual composition or introduce a new element.
Negative prompt support Specify what you don't want in the output for more precise scene control.
Prompt expansion Enable enable_prompt_expansion to let the model automatically enrich and optimize your prompt before generation.
Resolution options Generate at 720p or 1080p to match your delivery requirements.
| Parameter | Required | Description |
|---|---|---|
| reference_images | No | Reference image URLs (max 5). Combined with videos, total must be 1-5. |
| videos | Yes | One or more reference videos. Click Add Item to include additional videos. |
| prompt | Yes | Text description of the desired scene and action. Reference characters as "Video 1", "Video 2" etc. |
| image | No | Optional reference image to supplement the video references. |
| negative_prompt | No | Elements to exclude from the generated video. |
| resolution | No | Output resolution: 720p (default) or 1080p. |
| aspect_ratio | No | Output aspect ratio. Default: 16:9. |
| duration | No | Clip length in seconds. Default: 5. |
| enable_prompt_expansion | No | Enable automatic prompt optimization before generation. Default: off. |
| seed | No | Random seed for reproducible results. Use -1 for a random seed. |
In the prompt, videos are numbered first (video 1, video 2, ...), then reference_images continue the numbering as image N. For example, if you provide 2 videos and 2 reference images:
Example prompt: "video 2 holds image 3 and plays a gentle folk song in a cafe, video 1 smiles while watching video 2"
| Duration | 720p | 1080p |
|---|---|---|
| 5s | $1.00 | $1.60 |
| 10s | $1.50 | $2.40 |
| 15s | $2.00 | $3.20 |
Grab a WaveSpeedAI API key, then call POST https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/reference-to-video with your input as JSON. The endpoint returns a prediction id; poll the prediction endpoint until status flips to completed, then read the output URL from data.outputs[0]. Examples for Wan 2.7 Reference To Video below.
# Submit the prediction
curl -X POST "https://api.wavespeed.ai/api/v3/alibaba/wan-2.7/reference-to-video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d '{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://example.com/your-input.jpg",
"negative_prompt": "blurry, low quality, distorted",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"enable_prompt_expansion": false,
"seed": -1
}'
# Response includes a prediction id. Poll for the result:
curl -X GET "https://api.wavespeed.ai/api/v3/predictions/{request_id}/result" \
-H "Authorization: Bearer $WAVESPEED_API_KEY"
# When status is "completed", read the output from data.outputs[0].// npm install wavespeed
const WaveSpeed = require('wavespeed');
const client = new WaveSpeed(); // reads WAVESPEED_API_KEY from env
const result = await client.run("alibaba/wan-2.7/reference-to-video", {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://example.com/your-input.jpg",
"negative_prompt": "blurry, low quality, distorted",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"enable_prompt_expansion": false,
"seed": -1
});
console.log(result.outputs[0]); // → URL of the generated output# pip install wavespeed
import wavespeed
output = wavespeed.run(
"alibaba/wan-2.7/reference-to-video",
{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://example.com/your-input.jpg",
"negative_prompt": "blurry, low quality, distorted",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"enable_prompt_expansion": false,
"seed": -1
}
)
print(output["outputs"][0]) # → URL of the generated outputWan 2.7 Reference To Video is a Alibaba model for video generation from images, exposed as a REST API on WaveSpeedAI. WAN 2.7 Reference-to-Video turns character, prop, or scene references from images or videos into new video shots with preserved identity, style, and layout plus smooth, coherent motion. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing. You can call it programmatically or try it from the playground above.
POST your input parameters to the model's REST endpoint (shown in the API tab of this playground) with your WaveSpeedAI API key in the Authorization header. Submission returns a prediction ID; poll the prediction endpoint until status flips to "completed", then read the output URL from the result. The playground generates a ready-to-paste code sample in Python, JavaScript, or cURL for whatever inputs you've set. Full request/response shape is documented at https://wavespeed.ai/docs/docs-api/alibaba/alibaba-wan-2.7-reference-to-video.
Wan 2.7 Reference To Video starts at $0.50 per run. That figure is the base price — the final charge scales with the parameters you set in the form (output size, length, count, references, or whatever knobs this model exposes), so a higher-quality or larger output costs more than a minimal one. The exact cost for your current input is shown live next to the Generate button before you submit, and the actual per-call charge is recorded on the prediction afterwards.
Key inputs: `prompt`, `image`, `aspect_ratio`, `resolution`, `duration`, `seed`. The full JSON schema (types, defaults, allowed values) is rendered above the Generate button and mirrored in the API reference at https://wavespeed.ai/docs/docs-api/alibaba/alibaba-wan-2.7-reference-to-video.
Sign up for a free WaveSpeedAI account to claim starter credits, copy your API key from /accesskey, then call the endpoint shown in the API tab of the playground. The playground also auto-generates a code sample in Python, JavaScript, or cURL for the parameters you've set.
Commercial usage rights depend on the model's license, set by its provider (Alibaba). The license summary appears on the model card above; see WaveSpeedAI's Terms of Service for platform-level conditions.