# Alibaba Wan 2.7 Text to Video API

> Alibaba Wan 2.7 text-to-video model with cinematic visuals, native audio generation, and configurable duration and resolution.

Source: https://www.sandbase.ai/models/alibaba/wan/2.7/text-to-video
API reference: https://www.sandbase.ai/models/alibaba/wan/2.7/text-to-video/docs

## Facts

- Provider: Alibaba
- Type: Video model
- Model ID: `alibaba/wan/2.7/text-to-video`
- Price: From $0.50 per run
- Capabilities: text to video
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -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"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Alibaba Wan 2.7 Text to Video through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/wan/2.7/text-to-video" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Alibaba account?

No. One SandBase API key and balance gives you access to Alibaba Wan 2.7 Text to Video and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Wan 2.7 Text to Video

Write a scene and get back a 2–15 second clip with optional driving audio. Wan 2.7 improves motion smoothness and scene fidelity over 2.6 and keeps camera instructions more faithfully.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 50,000 characters. |
| `duration` | 2–15 | 5 | Output length in seconds. |
| `audio` | audio URL | — | Optional WAV/MP3 URL that drives speech or rhythm in the clip. |
| `aspect_ratio` | `16:9` / `9:16` / `1:1` / `4:3` / `3:4` | `16:9` | Output frame shape. |
| `resolution` | `720p` / `1080p` | `720p` | Sets the per-second rate. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

You pay for output seconds: $0.10 at 720p and $0.15 at 1080p, the same as Alibaba's list price.

| Output | 720p | 1080p |
|---|---|---|
| 2s | $0.20 | $0.30 |
| 5s (default) | $0.50 | $0.75 |
| 10s | $1.00 | $1.50 |
| 15s | $1.50 | $2.25 |

Failed runs are not charged.

#### Prompting

- Describe the shot in order: subject, action, setting, camera move, light, and sound.
- Give camera timing explicitly, e.g. “holds for two seconds, then pushes in slowly”.
- Put spoken lines in quotes and say who speaks them.

> A young woman sits by a rain-streaked café window, slowly turns toward the camera and smiles; slow push-in, warm interior light, soft rain on the glass.

#### Limits

- Text only; to start from your own picture use `alibaba/wan/2.7/image-to-video`.

#### Also on SandBase

Other Wan 2.7 endpoints: `alibaba/wan/2.7/image-to-video`, `alibaba/wan/2.7/reference-to-video`, `alibaba/wan/2.7/video-edit`, `alibaba/wan/2.7/video-extend`, `alibaba/wan/3.0/video` (newer, up to 30s).
