alibaba/wan/2.7/text-to-video
Alibaba Wan 2.7 text-to-video model with cinematic visuals, native audio generation, and configurable duration and resolution.
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/text-to-videoInput Schema
5 parameters · 1 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The text prompt to generate a video from. · Min length: 3 · Max length: 50000 · Default: "A young woman sitting by a rain-streaked window in a café, slowly turning to look at the camera with a gentle smile, warm interior lighting" |
audio | string | Optional | The URL of an audio file 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 · Default: "16:9" 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/text-to-video",
"prompt": "A young woman sitting by a rain-streaked window in a café, slowly turning to look at the camera with a gentle smile, warm interior lighting",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'
# 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 Text-to-Video
Wan 2.7 Text-to-Video creates a complete short clip from one written scene. The prompt establishes subject, action, camera, light, atmosphere, and style without requiring a starting image. An optional audio file can guide how the visual sequence relates to sound.
The route covers durations from 2 to 15 seconds, five frame shapes, and 720p or 1080p delivery. These choices support quick drafts and higher-resolution final assets through the same text-led workflow. The result is returned as a video URL with file metadata when available.
Highlights
- Enhanced motion smoothness. Wan 2.7 is documented with improved motion smoothness. This capability applies to action and camera movement generated from text.
- Superior scene fidelity. The exact text-to-video route highlights stronger fidelity to the described scene. It supports detailed visual direction without an image input.
- Greater visual coherence. Wan 2.7 is documented to improve visual coherence. The generated scene is intended to remain connected as action develops over time.
- Natural-language multi-shot generation. The exact route documents multi-shot video controlled through natural language in the prompt. Shot changes are expressed inside the creative brief rather than a separate storyboard field.
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 |
|---|---|
| Produce a food, beauty, or product visual from a written concept. | Preserve a specific opening composition; use image-to-video. |
| Build a short scene whose camera and action are planned entirely in text. | Need a single request longer than 15 seconds. |
| Describe several shots inside one natural-language brief. | Need separately structured shot objects in the request. |
| Time a visual sequence against an existing audio track. | Need sound generated without supplying audio. |
| Prepare landscape, vertical, square, or 4:3 delivery. | Need a frame shape outside the documented set. |
Prompt Guide
Write the scene in temporal order. Start with setting and subject, then describe action, camera, lighting, atmosphere, and any shot changes; explain how supplied audio should guide timing when used.
Scene: [place, time, atmosphere]
Subject: [appearance and action]
Camera: [framing and movement]
Lighting: [direction, color, progression]
Shots: [natural-language sequence when needed]
Audio relationship: [timing or mood from the supplied track]
{
"prompt": "A young woman sits beside a rain-streaked café window, then slowly turns toward the camera with a gentle smile as warm interior light reflects in the glass.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
Technical Specs
| Spec | Value |
|---|---|
| Required input | prompt |
| Prompt length | 3–50,000 characters |
| Duration | 2–15 seconds; default 5 |
| Resolution | 720p default, 1080p |
| Aspect ratios | 16:9, 9:16, 1:1, 4:3, 3:4 |
| Audio guidance | Optional audio URL |
| Output | Video URL with optional file metadata |
Related
- Wan 2.7 Image-to-Video — Animate a supplied opening image.
- Wan 2.7 Reference-to-Video — Generate with appearance references.

