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

# Wan 2.7

Wan 2.7 supports text-to-video, image-to-video, reference generation, and editing. Use text prompts for multi-shot videos with automatic dubbing or custom audio. Image-to-video supports first frames, first and last frames, and video continuation. Editing accepts text, images, and video for instruction-based edits and video transfer.

### Model parameters

* Model IDs: `wan2.7-t2v` / `wan2.7-i2v` / `wan2.7-r2v` / `wan2.7-videoedit`
* Pricing: see the [model catalog](https://geekai.co/models?platform=dashscope\&type=video) for current rates.
* Endpoint: `https://geekai.co/api/v1/videos/generations`
* Parameters: [Video API reference](https://docs.geekai.co/en/api/video/generations.md)
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md)

> [!NOTE]
>
> The following video API parameters are not supported:
>
> * `with_audio`
> * `size`
> * `quality`
> * `fps`
>
> See the [official Wan 2.7 API documentation](https://help.aliyun.com/zh/model-studio/use-video-generation).

`aspect_ratio` accepts the following values:

* `1:1`
* `16:9`
* `9:16`
* `4:3`
* `3:4`

Output dimensions by resolution and aspect ratio:

| Resolution | Aspect ratio | Output dimensions (width × height) |
| - | - | - |
| 720P | 16:9 | 1280x720 |
| | 9:16 | 720x1280 |
| | 1:1 | 960x960 |
| | 4:3 | 1104x832 |
| | 3:4 | 832x1104 |
| 1080P | 16:9 | 1920x1080 |
| | 9:16 | 1080x1920 |
| | 1:1 | 1440x1440 |
| | 4:3 | 1648x1248 |
| | 3:4 | 1248x1648 |

Use an uppercase P in `resolution`: `720P` or `1080P`.

### Text to video

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-t2v",
    "prompt": "A suspenseful cinematic detective story. Shot 1 [0–3s], wide: neon flickers on a rainy New York street as a detective in a black trench coat strides past. Shot 2 [3–6s], medium: he enters an old building with his coat soaked; the door slowly closes behind him. Shot 3 [6–9s], close-up: distant sirens sound; his focused eyes narrow as he thinks. Shot 4 [9–12s], medium: he advances cautiously down a dim hallway with his flashlight. Shot 5 [12–15s], close-up: he spots a key clue, and recognition lights up his face.",
    "resolution": "720P",
    "aspect_ratio": "16:9"
}'
```

`wan2.7-t2v` also accepts an audio file in `audio_url`:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-t2v",
    "prompt": "An epic, adorable scene: a tiny cartoon kitten general in finely detailed golden armor and a slightly oversized helmet sits bravely on a little warhorse on a cliff. He recites: ‘Long clouds over Qinghai darken snowy peaks; a lone fortress looks toward Jade Gate Pass. A hundred battles in yellow sands wear through our golden armor; until Loulan falls, we shall not return.’ Below, an endless army of mice charges with makeshift weapons. Dark clouds gather over distant snowy peaks. Stage it like an ancient Chinese war epic, at once funny, cute and commanding.",
    "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250923/hbiayh/%E4%BB%8E%E5%86%9B%E8%A1%8C.mp3",
    "resolution": "720P",
    "aspect_ratio": "16:9",
    "duration": 10
}'
```

The JSON response includes the generated video's URL:

```json theme={null}
{
    "model": "wan2.7-t2v",
    "task_id": "da83f740-b46b-40c9-bae3-5e92eaaeffbe",
    "task_status": "succeed",
    "video_result": [
        {
            "id": "5e395454-749b-4520-8da5-f778d3e589fb",
            "url": "https://static.geekai.co/video/2026/04/10/b8953f0104c94770acf4563779207106.mp4"
        }
    ]
}
```

The image-to-video and other examples below use the same response format.

### Image to video

**From the first frame**

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-i2v",
    "prompt": "Urban fantasy art: a spray-painted teenage graffiti character springs to life from a concrete wall beneath a city railway bridge at night. He strikes an energetic rapper’s pose while rapping in English at breakneck speed. A lone streetlamp gives the scene cinematic lighting, vivid detail and energy. The soundtrack consists entirely of rap, with no other dialogue or noise.",
    "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
    "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3",
    "resolution": "720P"
}'
```

**From the first and last frames**

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-i2v",
    "prompt": "Realistic style. A black kitten gazes curiously at the sky. Rise gradually from eye level to an overhead view of its inquisitive eyes.",
    "image": "https://wanx.alicdn.com/material/20250318/first_frame.png",
    "image_tail": "https://wanx.alicdn.com/material/20250318/last_frame.png",
    "resolution": "720P"
}'
```

**Video continuation**

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-i2v",
    "prompt": "A girl takes a mirror selfie, then puts on her backpack and leaves",
    "video": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/hfugmr/wan-r2v-role1.mp4",
    "resolution": "720P",
    "duration": 10
}'
```

> [!NOTE]
>
> For wan2.7-i2v, `resolution` accepts 720P or 1080P.

### Reference to video

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-r2v",
    "prompt": "In a café, the person in video 2 holds the instrument from image 3 and plays a gentle American country ballad as the person in video 1 watches with a smile",
    "resolution": "720P",
    "duration": 10,
    "extra_body": {
        "media": [
            {
                "type": "reference_video",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/hfugmr/wan-r2v-role1.mp4"
            },
            {
                "type": "reference_video",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4"
            },
            {
                "type": "reference_image",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"
            }
        ]
    }
}'
```

### Video editing

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"wan2.7-videoedit",
    "prompt": "Replace the girl’s clothes in the video with the outfit in the image",
    "resolution": "720P",
    "extra_body": {
        "media": [
            {
                "type": "video",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260403/nlspwm/T2VA_22.mp4"
            },
            {
                "type": "reference_image",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260402/fwjpqf/wan2.7-videoedit-change-clothes.png"
            }
        ]
    }
}'
```

### Asynchronous tasks

Video generation can take a while. We recommend GeekAI's asynchronous workflow.

The [video API](https://docs.geekai.co/en/api/video/generations.md) uses `async` to control asynchronous generation. The default, `false`, waits for the finished video. Set it to `true` to receive a task ID you can poll.

Follow the [asynchronous task example](https://docs.geekai.co/en/docs/video/kling/kling-video-v3-omni.md#asynchronous-tasks) to retrieve the result.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.