alibaba/wan/2.7/reference-to-video
Alibaba Wan 2.7 reference-to-video model generating video guided by reference content.
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runalibaba/wan/2.7/reference-to-videoInput Schema
7 parameters · 2 required · 5 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
images | string[] | Required | The URLs of reference images to guide video generation. Provide at least one reference image or video. |
prompt | string | Required | The text prompt to generate a video from. · Min length: 3 · Max length: 50000 · Default: "A golden retriever puppy running through a field of wildflowers in slow motion, ears flapping, tongue out, soft backlight" |
audios | string[] | Optional | The URLs of reference audio files to guide video generation. |
videos | string[] | Optional | The URLs of reference videos to guide video generation. |
duration | integer | Optional | The duration of the generated video in seconds. · Options: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · Default: 5 23456789101112131415 |
resolution | string | Optional | The resolution of the video to generate. · Options: 720p, 1080p · Default: "720p" 720p1080p |
aspect_ratio | string | Optional | The aspect ratio of the generated video. · Options: 16:9, 9:16, 1:1, 4:3, 3:4 16:99:161:14:33:4 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
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.7/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
],
"prompt": "A golden retriever puppy running through a field of wildflowers in slow motion, ears flapping, tongue out, soft backlight",
"duration": 5,
"resolution": "720p"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Wan 2.7 Reference to Video
Wan 2.7 Reference to Video creates a new video under the guidance of supplied visual references and a written scene description. It is intended for work where the generated sequence should draw from existing subjects or visual material rather than begin from text alone. Reference images establish the visual anchors while the prompt directs the action and scene.
The route accepts a prompt and reference images as its required creative inputs. Optional media fields can carry additional guidance under the local request contract. The result is a newly generated clip rather than a conventional edit of the input media.
Highlights
- Enhanced motion smoothness. Wan 2.7 is documented with improved motion smoothness. The reference-guided route applies that family capability to a newly generated sequence.
- Superior scene fidelity. The exact Wan 2.7 route highlights stronger fidelity to the generated scene. This helps the resulting video retain a coherent visual treatment.
- Greater visual coherence. Wan 2.7 is designed to keep the generated visuals connected over time. That capability is especially relevant when references anchor subjects or visual material.
- Multi-character interactions. The exact reference-to-video route supports scenes where multiple referenced characters perform and interact. This extends reference guidance beyond a single subject.
Pricing
| Duration | Resolution | Price |
|---|---|---|
| 2 seconds | 720p | $0.20 |
| 2 seconds | 1080p | $0.30 |
| 3 seconds | 720p | $0.30 |
| 3 seconds | 1080p | $0.45 |
| 4 seconds | 720p | $0.40 |
| 4 seconds | 1080p | $0.60 |
| 5 seconds | 720p | $0.50 |
| 5 seconds | 1080p | $0.75 |
| 6 seconds | 720p | $0.60 |
| 6 seconds | 1080p | $0.90 |
| 7 seconds | 720p | $0.70 |
| 7 seconds | 1080p | $1.05 |
| 8 seconds | 720p | $0.80 |
| 8 seconds | 1080p | $1.20 |
| 9 seconds | 720p | $0.90 |
| 9 seconds | 1080p | $1.35 |
| 10 seconds | 720p | $1.00 |
| 10 seconds | 1080p | $1.50 |
| 11 seconds | 720p | $1.10 |
| 11 seconds | 1080p | $1.65 |
| 12 seconds | 720p | $1.20 |
| 12 seconds | 1080p | $1.80 |
| 13 seconds | 720p | $1.30 |
| 13 seconds | 1080p | $1.95 |
| 14 seconds | 720p | $1.40 |
| 14 seconds | 1080p | $2.10 |
| 15 seconds | 720p | $1.50 |
| 15 seconds | 1080p | $2.25 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| Generating a new clip around a referenced subject | Starting from text with no visual reference |
| Carrying visual material from one or more images into a scene | Making a deterministic frame-by-frame edit |
| Using existing footage as optional generation guidance | Upscaling an unchanged video |
| Building a short sequence from a written action brief | Requiring a clip longer than 15 seconds in one request |
| Adding an audio reference when it should guide generation | Requiring a silent-only pipeline with no media guidance |
Prompt Guide
Use the prompt to describe what should happen in the newly generated clip, while the media arrays identify the reference material. Name the subject action, setting, camera behavior, and progression over time.
Referenced subject/material: [what to carry from the inputs]
Action: [movement over time]
Setting: [environment]
Camera: [framing and movement]
Progression: [beginning to ending state]
{
"images": ["https://example.com/character-reference.png"],
"prompt": "The referenced character walks through a windswept meadow at sunset as the camera tracks alongside, ending on a medium close-up.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | alibaba/wan/2.7/reference-to-video |
| Required inputs | prompt and images |
| Reference media | Image array; optional video and audio arrays |
| Duration | Integer 2 through 15 seconds; default 5 |
| Resolution | 720p or 1080p; default 720p |
| Aspect ratio | 16:9, 9:16, 1:1, 4:3, or 3:4 |
| Output | Video URL and content type |
| Execution | Asynchronous job |
Related
- Wan 2.7 Text to Video — start without reference media.
- Wan 2.7 Image to Video — animate one opening image.
