> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routerbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan 2.7 — Text to Video

> Generate a 2–15s video from a text prompt with Wan 2.7 at 720P or 1080P.

|              |                       |
| ------------ | --------------------- |
| **Model ID** | `alibaba/wan-2-7-t2v` |
| **Family**   | `wan-2-7-novita`      |
| **Task**     | `text-to-video`       |
| **Modality** | Video                 |
| **Upstream** | Alibaba Wan 2.7       |

<Note>
  The output dimension is the explicit `size` field (full pixel
  dimensions like `"1920*1080"`) — it sets both the aspect ratio and
  the per-second price tier.
</Note>

## Endpoint

```http theme={null}
POST https://routerbase.com/v1/videos/generations
```

Async — returns `{id, status: "pending"}`; poll
`GET /v1/videos/generations/{id}` until `success` or `failed`.

## Parameters

<ParamField body="prompt" type="string" required>
  Text prompt describing the desired video. Max 1500 characters.
</ParamField>

<ParamField body="size" type="enum" default="&#x22;1920*1080&#x22;">
  Full pixel dimensions — sets the aspect ratio and the price tier. One
  of `1920*1080`, `1080*1920`, `1440*1440`, `1632*1248`, `1248*1632`
  (\~2M px, **$0.15/s**), or `1280*720`, `720*1280`, `960*960`,   `1088*832`, `832*1088` (~0.9M px, **$0.10/s**).
</ParamField>

<ParamField body="duration" type="integer" default="5">
  Length of the generated clip in seconds. Range `[2, 15]`. Drives
  billing: `duration × size-tier rate` (see `size`).
</ParamField>

<ParamField body="audio_url" type="string">
  Optional URL to a reference audio track. Public HTTPS, MP3 / WAV.
</ParamField>

<ParamField body="negative_prompt" type="string">
  Content to actively steer the model away from. Max 500 characters.
</ParamField>

<ParamField body="prompt_extend" type="boolean" default="true">
  Whether the model should expand and refine the prompt before
  generation.
</ParamField>

<ParamField body="watermark" type="boolean" default="false">
  Whether to overlay an upstream watermark on the output.
</ParamField>

<ParamField body="seed" type="integer">
  Random-generator initialiser. Same seed + prompt + params produces
  deterministic output. Range `[0, 2147483647]`.
</ParamField>

## Example

```bash theme={null}
curl https://routerbase.com/v1/videos/generations \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/wan-2-7-t2v",
    "prompt": "a calm beach at sunrise, gentle waves",
    "size": "1920*1080",
    "duration": 5
  }'
```

```json theme={null}
{ "id": "wan_abc123…", "status": "pending", "model": "alibaba/wan-2-7-t2v" }
```

Poll until terminal:

```bash theme={null}
curl https://routerbase.com/v1/videos/generations/wan_abc123… \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY"
```

```json theme={null}
{
  "id": "wan_abc123…",
  "status": "success",
  "data": [{ "url": "https://…mp4" }]
}
```

## Reference
