Skip to content
Dashboard

Wan v2.6 Reference-to-Video Flash

Wan v2.6 Reference-to-Video Flash is Alibaba Cloud's fast reference-to-video model that preserves subject identity from video references and generates new scenes at speed, supporting 720p and 1080p output for rapid creative iteration.

View API reference
Price
$0.05, Per second
Lowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({
model: 'alibaba/wan-v2.6-r2v-flash',
prompt: 'A serene mountain lake at sunrise.'
});
Read docs

Copy link to headingPlayground

Try out Wan v2.6 Reference-to-Video Flash by Alibaba Cloud. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

alibaba logo
Images
Add up to 5 images
Videos
Add up to 3 videos
Prompt(optional)

Duration8s
2s10s
Resolution
Videos to generate
alibaba logo

Your generated video will appear here.

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Input
Output
Capabilities
ZDR
No Training
Free Tier
Release Date
$0.05/sec+1 more
12/16/2025

Getting started

Generate videos with Wan v2.6 Reference-to-Video Flash using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.

index.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'alibaba/wan-v2.6-r2v-flash',
prompt: 'character1 and character2 have a friendly conversation in a cozy cafe',
inputReferences: [
'https://example.com/cat.png',
'https://example.com/dog.png',
],
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Top-level parameters

Pass references through inputReferences and control the output with the top-level resolution and duration parameters. Wan uses resolution, not aspectRatio.

reference-to-video-top-level.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'alibaba/wan-v2.6-r2v-flash',
prompt: 'character1 and character2 have a friendly conversation in a cozy cafe',
inputReferences: [
'https://example.com/cat.png',
'https://example.com/dog.png',
],
resolution: '1920x1080',
duration: 4,
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);
ParameterTypeRequiredDescription
promptstringNoText description of the video to generate. Max 1500 characters.
durationnumberNoVideo length in seconds. 2-10 seconds.
resolutionstringNoResolution ('1280x720', '1920x1080').
aspectRatiostringNoAspect ratio ('16:9', '9:16', '1:1', '4:3', '3:4').
generateAudiobooleanNoGenerate synchronized audio with the video.
inputReferencesArray<string>NoReference images and videos, mapped in order onto character1, character2, and so on. URLs only — a non-URL reference is skipped with a warning, so upload local files to Vercel Blob first. See the Input limits table for supported counts and formats.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextUp to 1500 characters
Imagejpeg, jpg, png, bmp, webpurl520 MB≥240px · ≤8000px
Videomp4, movurl3100 MB1-30s
Up to 5 reference inputs total across images and videos.

Provider options

Load every Wan reference-to-video option under providerOptions.alibaba. References themselves go in the top-level inputReferences, where the first entry maps to character1, the second to character2, and so on.

reference-to-video-provider-options.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'alibaba/wan-v2.6-r2v-flash',
prompt: 'character1 and character2 have a friendly conversation in a cozy cafe',
inputReferences: [
'https://example.com/cat.png',
'https://example.com/dog.png',
],
resolution: '1920x1080',
duration: 4,
generateAudio: true,
providerOptions: {
alibaba: {
negativePrompt: 'blurry, low quality',
shotType: 'single',
watermark: false,
pollIntervalMs: 5000,
pollTimeoutMs: 600000,
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Pass Wan-specific options under providerOptions.alibaba in your generateVideo call. References come from the top-level inputReferences; referenceUrls is the legacy fallback.

ParameterTypeRequiredDescription
referenceUrlsstring[]NoArray of URLs to reference images or videos. The first URL maps to character1, the second to character2, and so on. Legacy alternative to the top-level inputReferences, used only when inputReferences is omitted. See the Input limits table for supported counts and formats.
negativePromptstringNoWhat to avoid in the video. Max 500 characters.
shotType'single' | 'multi'No'single' for a continuous shot. 'multi' for multiple camera angles.
audiobooleanNoGenerate audio with the video. Provider-side alias for the top-level generateAudio, which wins when both are set. v2.6 only — v2.7 always generates audio and ignores it with a warning.
watermarkbooleanNoAdd watermark to the video. Defaults to false.
pollIntervalMsnumberNoHow often to check task status. Defaults to 5000.
pollTimeoutMsnumberNoMaximum wait time. Defaults to 600000 (10 minutes).

Reference-to-video vs image-to-video

Reference-to-video uses the top-level inputReferences to show the model what your characters look like, then generates a brand-new scene from your prompt. The reference media never becomes the video content; reference each one in the prompt with character1, character2, and so on (first entry maps to character1).

Image-to-video instead animates the actual image you pass in frameImages or prompt.image. The image you provide becomes the video content, and you add motion to that exact scene.

Reference media with Vercel Blob

References must be URLs. If you have local files, upload them to Vercel Blob first, then pass the returned URLs in inputReferences.

reference-to-video-with-blob.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
import { put } from '@vercel/blob';
async function main() {
const catImage = fs.readFileSync('./cat.png');
const { url: catUrl } = await put('cat.png', catImage, { access: 'public' });
const dogImage = fs.readFileSync('./dog.png');
const { url: dogUrl } = await put('dog.png', dogImage, { access: 'public' });
const result = await generateVideo({
model: 'alibaba/wan-v2.6-r2v',
prompt: 'character1 and character2 play together in a sunny garden',
inputReferences: [catUrl, dogUrl],
resolution: '1280x720',
duration: 4,
providerOptions: {
alibaba: {
shotType: 'single',
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Copy link to headingMore models by Alibaba Cloud

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
991K3.9 s50 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+2
alibaba logo
09/01/2026
991K1.1 s96 tps
$0.16/M
$0.47/M
Read$0.02/M
Write$0.20/M
+2
alibaba logo
08/26/2026
1M0.6 s133 tps
$0.10/M
$0.40/M
Read$0.01/M
Write$0.63/M
+1
alibaba logo
deepinfra logo
morph logo
+3
08/14/2026
1M2.5 s154 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+1
alibaba logo
fireworks logo
08/02/2026
991K2.5 s140 tps
$0.03/M+2 more
$0.13/M+2 more
Read$0.006/M
Write$0.04/M
+2
alibaba logo
07/28/2026
1M2.0 s58 tps
$0.40/M+1 more
$1.60/M+1 more
Read$0.08/M
Write$0.50/M
+2
alibaba logo
06/02/2026

Copy link to headingAbout Wan v2.6 Reference-to-Video Flash

Wan v2.6 Reference-to-Video Flash shares the same core capability as the standard R2V model, extracting a subject's visual and vocal identity from a reference video and placing them into text-prompted new scenes, but is built for contexts where generation speed is the binding constraint. The Flash architecture reduces wait times substantially, enabling creative teams to iterate through prompt variations and scene configurations much faster than the standard model allows.

The reference extraction pipeline works the same way: pass reference URLs alongside a descriptive prompt, and use character1, character2, and so on in the instruction to match URL order (images or videos; 2 to 30 seconds per video reference, within provider limits on total references). The model extracts appearance, movement style, and voice characteristics and applies them to the generated output. Because the Flash variant is optimized for speed rather than peak reconstruction fidelity, fine details in identity preservation may differ slightly from the standard R2V output.

R2V Flash supports 720p and 1080p resolutions and output durations of 2 to 10 seconds, making it suitable for social content previews, storyboard animatics, or any workflow where a director needs rapid visual confirmation that a scene concept works before ordering full-quality renders.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: When a production deliverable demands maximum identity fidelity from the reference material, evaluate the standard wan-v2.6-r2v model before finalizing your pipeline choice.
  • Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Wan v2.6 Reference-to-Video Flash

Best for

  • Fast scene concept iteration: Verifying character identity before committing to full-quality R2V renders
  • High-volume social content: Pipelines where volume and speed of character-consistent clips outweigh pixel-perfect fidelity
  • Storyboards and animatics: Live-action or animation pre-production using real talent references
  • High-throughput brand content: Generating many assets quickly where a mascot or spokesperson must appear consistently

Consider alternatives when

  • Maximum identity fidelity: Use wan-v2.6-r2v for the highest-quality character transfer in final deliveries
  • Still-photo source material: Use wan-v2.6-i2v-flash for image-based animation when the source is a still photo
  • No reference subject needed: Use wan-v2.6-t2v for purely text-prompted video generation

Wan v2.6 Reference-to-Video Flash makes identity-consistent video generation fast enough for iterative creative workflows, preserving the reference-to-video capability that makes the R2V series unique while dramatically shortening generation time. It fits naturally into pipelines where R2V Flash handles draft cycles and the standard R2V model handles final output.

Copy link to headingFrequently Asked Questions

  • What makes R2V Flash different from the standard R2V model?

    Flash is speed-optimized. It generates reference-consistent video much faster than the standard R2V at a potential tradeoff in peak identity fidelity. For drafts and iteration, Flash is preferred; for final output, the standard R2V model is recommended.

  • Does R2V Flash support the same reference video format as standard R2V?

    Yes. Both accept the same reference URL lists and prompt conventions: use character1, character2, and so on in the prompt, in URL order, with 2 to 30 seconds per video reference where applicable.

  • What resolutions does R2V Flash support?

    720p and 1080p. The R2V variants don't include a 480p option.

  • What is the maximum generated video length?

    Output duration is 2 to 10 seconds for Wan R2V on AI Gateway. The 15-second option available on some T2V and I2V models does not apply here.

  • Can R2V Flash handle multiple characters from different reference clips in one scene?

    Yes. You can combine several reference URLs in one request (within provider limits) and name them character1, character2, and so on in the prompt.

  • Is audio included in generated output?

    Voice and audio characteristics captured from the reference clips are part of the identity extraction process; check provider-level documentation for specific audio output behavior.

Your use is subject to Alibaba Cloud's Terms & Privacy Policies.