# Wan 2.6 API

> Wan 2.6 — high-quality AI video generation.

- **Provider**: Wan
- **Model id**: `wan-2-6-video-to-video`
- **Modality**: video
- **Price**: 43.73–196.76 credits

## Overview

Wan 2.6 is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `wan-2-6-video-to-video` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | Text prompts for video generation. Supports both Chinese and English, with a minimum of 2 characters and a maximum of 5,000 characters. (default: Restyle into a rich cinematic color grade with soft golden rim light and filmic contrast, preserving the original motion and composition.) |
| video_urls | string[] | Yes | The URL of the image used to generate video (image URL) |
| duration | string | No | The duration of the generated video in seconds (options: 5 | 10) (default: 5) |
| resolution | string | No | Video resolution tier (options: 720p | 1080p) (default: 1080p) |
| multi_shots | boolean | No | The multi shots parameter controls the shot composition style during AI video generation, determining whether the generated video is a single continuous shot or multiple shots with transitions. (true/false) (default: false) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |

### Request example

```json
{
  "modelId": "wan-2-6-video-to-video",
  "input": {
    "prompt": "A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.",
    "video_urls": [
      "https://example.com/input.jpg"
    ],
    "duration": "5",
    "resolution": "1080p",
    "multi_shots": false,
    "nsfw_checker": true
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 24
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=wan-2-6-video-to-video`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
