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

# Wan 2.6 - Image to Video

> Generate dynamic videos from static images using the Wan 2.6 Image to Video model.

Generate dynamic videos from static images using the **Wan 2.6 Image to Video** model.

## Overview

The generation workflow consists of two steps:

1. Create a video generation task.
2. Query the task status and retrieve the generated results.

## Endpoint

```http theme={null}
POST /api/v1/jobs/createTask
```

## Authentication

All API requests require a Bearer Token.

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Parameters

### Top-Level Parameters

| Parameter | Type   | Required | Description                            |
| --------- | ------ | -------- | -------------------------------------- |
| `model`   | string | Yes      | Must be `wan/2-6-image-to-video`.      |
| `input`   | object | Yes      | Parameters used to generate the video. |

<ParamField body="model" type="string" required>
  Must be `wan/2-6-image-to-video`.
</ParamField>

<ParamField body="input" type="object" required>
  The `input` object contains the parameters used to generate the video.

  ### `input` Parameters

  <ParamField body="prompt" type="string" required>
    Use `prompt` to describe the video you want to generate.

    * Supports Chinese and English. <br /> **Minimum length:** `2` characters. <br /> **Maximum length:** `5,000` characters.
  </ParamField>

  <ParamField body="image_url" type="string" required>
    Use the provided image URL as source image. <br /> The `image_url` must contain the URL of an uploaded image. The value must be an uploaded file URL, not the file content itself.

    Supported image types:

    * `image/jpeg`
    * `image/png`
    * `image/webp` <br />
    * Maximum items: **1**
    * Maximum file size: **10 MB**
    * Minimum dimensions: `256` × `256` px
  </ParamField>

  <ParamField body="duration" default="5" type="string">
    Use `duration` to specify the length of the generated video in seconds.

    Supported values:

    * `"5"`
    * `"10"`
    * `"15"`

    Default: `"5"`
  </ParamField>

  <ParamField body="resolution" default="1080p" type="string">
    Specify the resolution of the output video.

    Supported output resolutions:

    * `720p`
    * `1080p`

    **Default:** `1080p`
  </ParamField>

  <ParamField body="multi_shots" default="false" type="boolean">
    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.

    * `false` — single continuous shot.
    * `true` — multiple shots with transitions.

    **Default:** `false`
  </ParamField>
</ParamField>

## Request

### Example

```json theme={null}
{
  "model": "wan/2-6-image-to-video",
  "input": {
    "prompt": "Describe a video you want to generate.",
    "image_urls": ["https://example.com/input-image.webp"],
    "duration": "5",
    "resolution": "1080p",
    "multi_shots": false,
  }
}
```

## Successful Response

<ResponseField name="code" type="number">
  Response status code.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Contains the error description when the request fails.

  **Example:** `success`
</ResponseField>

<ResponseField name="data" type="object" required>
  The task data object containing task id.

  <ResponseField name="taskId" type="string" required>
    The unique identifier for this task.

    **Example:** `task_123456`
  </ResponseField>
</ResponseField>

## Query Task Status

After submitting a task, use the unified query endpoint to check the task progress and retrieve the generated results.

<Card title="Get Task Details" icon="search" href="/get-task-detail">
  Check task status, monitor generation progress, and retrieve results.
</Card>

## Error Response

```json theme={null}
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}
```

## Response Codes

|  Code | Meaning                                                                   |
| ----: | ------------------------------------------------------------------------- |
| `200` | Success — the request was successfully processed.                         |
| `401` | Unauthorized — authentication credentials are missing or invalid.         |
| `402` | Insufficient Credits — the account does not have enough credits.          |
| `404` | Not Found — the requested resource or interface does not exist.           |
| `408` | Upstream service issue — no result has been returned for over 10 minutes. |
| `422` | Validation Error — request parameters failed validation.                  |
| `429` | Rate Limited — request frequency limit has been exceeded.                 |
| `433` | Request Limit — sub-key usage exceeded the limit.                         |
| `455` | Service Unavailable — system is undergoing maintenance.                   |
| `500` | Server Error — an unexpected error occurred while processing the request. |
| `501` | Generation Failed — content generation failed.                            |
| `505` | Feature Disabled — the requested feature is disabled.                     |
