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

# Wan2.2 A14B

> Generate silent videos from text or a first-frame image with the Wan2.2 A14B model family.

Wan2.2 A14B provides two asynchronous video workflows through `POST https://www.anyfast.ai/v1/video/generations`:

* `wan2.2-t2v-a14b` for text-to-video
* `wan2.2-i2v-a14b` for image-to-video

Save the returned task ID and query `GET /v1/video/generations/{task_id}` for the result.

<Info>
  The AnyFast request shape below is different from Alibaba Cloud Model Studio's direct API. Use the AnyFast fields shown on this page when calling `www.anyfast.ai`.
</Info>

## Key capabilities

| Capability     | Model ID          | Input                             | Output                                       |
| -------------- | ----------------- | --------------------------------- | -------------------------------------------- |
| Text to video  | `wan2.2-t2v-a14b` | Text prompt                       | Silent video                                 |
| Image to video | `wan2.2-i2v-a14b` | First-frame image and text prompt | Silent video following the input composition |

Both workflows support a 3–5 second duration, explicit output width and height, and an optional random seed through the current AnyFast contract.

## Capability examples

<Tabs sync={false}>
  <Tab title="Text to video">
    Describe the subject, action, setting, visual style, and camera motion in `prompt`. Use `wan2.2-t2v-a14b`; do not send an image.

    A useful prompt states the primary motion before secondary visual details:

    > A paper lantern floats above a quiet riverside town at dusk. The camera follows from below as warm reflections ripple across the water.
  </Tab>

  <Tab title="Image to video">
    Use `wan2.2-i2v-a14b` and provide one public image URL in `image`. The image defines the first frame; `prompt` describes how the scene should move.

    <Frame caption="Alibaba Cloud upstream first-frame example">
      <img src="https://cdn.translate.alibaba.com/r/wanx-demo-1.png" alt="A cat on grass used as the upstream Wan first-frame example" className="mx-auto max-h-[28rem] w-auto rounded-xl object-contain" />
    </Frame>

    The image above is an Alibaba Cloud upstream input example. It was not reproduced through AnyFast.
  </Tab>
</Tabs>

## Create a task

<Tabs sync={false}>
  <Tab title="Text to video">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan2.2-t2v-a14b",
        "prompt": "A paper lantern floats above a quiet riverside town at dusk. The camera follows from below.",
        "duration": 5,
        "width": 1280,
        "height": 720,
        "seed": 42
      }'
    ```
  </Tab>

  <Tab title="Image to video">
    ```bash cURL theme={null}
    curl --request POST \
      --url https://www.anyfast.ai/v1/video/generations \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "wan2.2-i2v-a14b",
        "prompt": "The cat runs forward through the grass while the camera tracks alongside it.",
        "image": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png",
        "duration": 5,
        "width": 1280,
        "height": 720,
        "seed": 42
      }'
    ```
  </Tab>
</Tabs>

## Request behavior

| Field             | Text to video                                 | Image to video                                |
| ----------------- | --------------------------------------------- | --------------------------------------------- |
| `model`           | `wan2.2-t2v-a14b`                             | `wan2.2-i2v-a14b`                             |
| `prompt`          | Required                                      | Required                                      |
| `image`           | Omit                                          | Required public image URL                     |
| `duration`        | Optional number from 3 through 5; default `5` | Optional number from 3 through 5; default `5` |
| `width`, `height` | Optional output dimensions                    | Optional output dimensions                    |
| `seed`            | Optional random seed                          | Optional random seed                          |
| `metadata`        | Optional upstream extension object            | Optional upstream extension object            |

## Image input requirements

Alibaba Cloud documents these Wan2.2 family limits for first-frame images:

* JPEG, JPG, PNG without an alpha channel, BMP, or WebP
* Public HTTP/HTTPS URL or Base64 data URI
* Width and height between 240 and 8,000 pixels
* File size no larger than 10 MB

See the [Alibaba Cloud image-to-video API reference](https://www.alibabacloud.com/help/en/model-studio/legacy-image-to-video-api-reference/) for the upstream format details.

## Query and retain the result

Poll `GET https://www.anyfast.ai/v1/video/generations/{TASK_ID}` using the task ID returned by the create request.

* Continue polling while the AnyFast outer `data.status` is `NOT_START`, `QUEUED`, or `IN_PROGRESS`.
* On `SUCCESS`, read `data.result_url`.
* On `FAILURE`, read `data.fail_reason`.
* `data.progress` is a percentage string such as `"0%"` or `"100%"`.
* Download a successful result promptly because upstream video URLs are temporary.

The nested `data.data.output.task_status` is the upstream provider status. Use the outer AnyFast status to control your polling loop.

<Card title="Wan2.2 A14B API Reference" icon="code" href="/api-reference/model-api/alibaba/wan2.2-a14b">
  View both creation workflows and the shared task-query response.
</Card>

<script src="/public/feedback.js" />
