API reference · Alibaba

alibaba/wan/2.6/reference-to-video/flash

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

VIDEOAsyncOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDalibaba/wan/2.6/reference-to-video/flash
01

Input Schema

9 parameters · 1 required · 8 optional

ParameterTypeRequiredDescription
promptstringRequiredUse Character1, Character2, etc. to reference subjects from your reference files. Works for people, animals, or objects. For multi-shot prompts: '[0-3s] Shot 1. [3-6s] Shot 2.' Max 1500 characters. Reference order: video_urls first, then image_urls. · Min length: 1
seedintegerOptionalRandom seed for reproducibility. If None, a random seed is chosen.
imagesstring[]OptionalReference images for subject consistency (0-5 images). Combined with video_urls, total references cannot exceed 5. Formats: JPEG, JPG, PNG (no alpha), BMP, WEBP. Resolution: 240-5000px. Max 10MB each. Reference order: image_urls continue numbering after video_urls.
videosstring[]OptionalReference videos for subject consistency (0-3 videos). Videos' FPS must be at least 16 FPS. Combined with image_urls, total references cannot exceed 5. Reference order: video_urls are numbered first (Character1, Character2...), then image_urls continue the sequence.
durationintegerOptionalDuration of the generated video in seconds. R2V Flash supports only 5 or 10 seconds. · Options: 5, 10 · Default: 5
510
resolutionstringOptionalVideo resolution tier. R2V Flash only supports 720p and 1080p. · Options: 720p, 1080p · Default: "1080p"
720p1080p
multi_shotsbooleanOptionalWhen true (default), enables intelligent multi-shot segmentation for coherent narrative videos with multiple shots. When false, generates single continuous shot. Only active when enable_prompt_expansion is True. · Default: true
aspect_ratiostringOptionalThe aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16
21:916:93:24:35:41:14:53:42:39:16
enable_audiobooleanOptionalWhether to generate a video with audio. Set to false for silent video generation. Silent videos are faster and cost 25% of the audio version price. · Default: true
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "alibaba/wan/2.6/reference-to-video/flash",
  "images": [
    "https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
  ],
  "prompt": "Dance battle between Character1 and Character2.",
  "videos": [
    "https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_videos_1.mp4"
  ],
  "duration": 5,
  "resolution": "1080p",
  "multi_shots": true,
  "enable_audio": true
}'

# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
  -H "Authorization: Bearer YOUR_API_KEY"