> ## 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 — Image to Video

> Animate a still image with a text prompt using Wan 2.7.

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

## 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 motion and changes from the source image.
  Max 5000 characters.
</ParamField>

<ParamField body="image_urls" type="string[]" required>
  Exactly one source-image URL (PNG / JPEG, publicly accessible over
  HTTPS).
</ParamField>

<ParamField body="resolution" type="&#x22;720P&#x22; | &#x22;1080P&#x22;" default="&#x22;1080P&#x22;">
  Output resolution. Drives the per-second rate ($0.10/s vs $0.15/s).
</ParamField>

<ParamField body="duration" type="integer" default="5">
  Length of the generated clip in seconds. Range `[2, 15]`.
</ParamField>

<ParamField body="last_frame_url" type="string">
  Optional public HTTPS URL pinning the final frame of the output.
</ParamField>

<ParamField body="driving_audio_url" type="string">
  Optional URL to a reference audio track used to drive motion / lip
  sync.
</ParamField>

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

<ParamField body="prompt_extend" type="boolean" default="true">
  Whether the model should expand 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. 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-i2v",
    "prompt": "the cat slowly turns its head and blinks",
    "image_urls": ["https://example.com/cat.jpg"],
    "resolution": "1080P",
    "duration": 5
  }'
```

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

Poll until terminal:

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

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

## Reference
