> ## 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 Text-to-Image

Wan generates images from text in a range of artistic styles, including photorealistic images.

### Model parameters

* Model IDs: `wan2.6-t2i`/`wan2.5-t2i-preview`/`wanx2.1-t2i-plus`/`wanx2.1-t2i-turbo`/`wan2.2-t2i-flash`/`wan2.2-t2i-plus`
* Pricing: Check the [Model Hub](https://geekai.co/models?platform=dashscope\&type=image) for current prices.
* Endpoint: `https://geekai.co/api/v1/images/generations`
* Parameters: See the [Image API reference](https://docs.geekai.co/en/api/image/generations.md).
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md).

> [!NOTE]
>
> The following Image API parameters are not supported:
>
> * `image`
> * `strength`
> * `aspect_ratio`
> * `quality`
> * `style_preset`
> * `response_format`
> * `output_format`
> * `mask`
> * `background`
>
> See also: [Official Wan text-to-image API documentation](https://help.aliyun.com/zh/model-studio/text-to-image).

For Wan 2.6 and Wan 2.5, use `size` to set the output resolution as width × height:

Common recommended resolutions and their aspect ratios:

| Aspect ratio | Pixel dimensions |
| - | - |
| 1:1 | 1280x1280 |
| 4:3 | 1472x1104 |
| 3:4 | 1104x1472 |
| 16:9 | 1696x960 |
| 9:16 | 960x1696 |

The total pixel count must be within `[1280x1280, 1440x1440] ` and the aspect ratio within `[1:4, 4:1]`.

For Wan 2.1 and Wan 2.2 text-to-image models, both dimensions must be within `[512, 1440]` pixels, up to a maximum resolution of `1440x1440`.

Use `n` to set the number of generated images (1–4).

### Text-to-image generation

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "wan2.6-t2i",
    "prompt": "A flower shop with ornate windows, a beautiful wooden door, and flowers on display",
    "size":"1280x1280",
    "negative_prompt": "Low quality",
    "watermark": true,
    "n": 2
}'
```

The response is a JSON object containing the URL of the generated image:

```json theme={null}
{
     "model": "wan2.6-t2i",
    "created": 1767754140,
    "task_id": "5a59c052-59e5-44a8-92f1-37a9571a8ab7",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2026/01/07/d4cb3902eb560fc70ddfe75af47a5f5f.png"
        },
        {
            "url": "https://static.geekai.co/image/2026/01/07/6bd717ed012ab02be2be779b07716b02.png"
        }
    ],
    "usage": {
        "billed_units": 2
    }
}
```


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