---
title: Wan 2.6 Image
description: Alibaba's Wan 2.6 text-to-image model generating images from text prompts with optional negative prompts and customizable dimensions.
image: https://developers.cloudflare.com/dev-products-preview.png
---

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

[Skip to content](#%5Ftop) 

![Alibaba logo](https://developers.cloudflare.com/_astro/alibaba.C3THgr9s.svg) 

#  Wan 2.6 Image 

Text-to-Image • Alibaba 

`alibaba/wan-2.6-image` 

Alibaba's Wan 2.6 text-to-image model generating images from text prompts with optional negative prompts and customizable dimensions.

| Model Info          |                                                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Terms and License   | [link ↗](https://www.alibabacloud.com/help/en/legal)                                                                    |
| More information    | [link ↗](https://wan.video/)                                                                                            |
| Zero data retention | Yes                                                                                                                     |
| Pricing             | [View pricing in the Cloudflare dashboard ↗](https://dash.cloudflare.com/?to=/:account/ai/models/alibaba/wan-2.6-image) |

## Usage

* [ TypeScript ](#tab-panel-92)
* [ cURL ](#tab-panel-93)

TypeScript

```
const response = await env.AI.run(  'alibaba/wan-2.6-image',  { prompt: 'A golden retriever puppy playing in autumn leaves' },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "alibaba/wan-2.6-image",  "input": {    "prompt": "A golden retriever puppy playing in autumn leaves"  }}'
```

* [ Output ](#tab-panel-90)
* [ Raw response ](#tab-panel-91)

![Simple Generation](https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/alibaba__wan-2.6-image/simple-generation.png) 

```
{  "gatewayMetadata": {    "keySource": "Unified"  },  "result": {    "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/66/20260417/c057796c/32701268-BbftSa6r_189314ac1a36.png"  },  "state": "Completed"}
```

## Examples

**Custom Dimensions**  — Specify image size in WxH format 

* [ TypeScript ](#tab-panel-96)
* [ cURL ](#tab-panel-97)

TypeScript

```
const response = await env.AI.run(  'alibaba/wan-2.6-image',  {    prompt:      'A vast alien desert landscape with two suns setting on the horizon, ancient ruins in the foreground',    size: '1024x768',  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "alibaba/wan-2.6-image",  "input": {    "prompt": "A vast alien desert landscape with two suns setting on the horizon, ancient ruins in the foreground",    "size": "1024x768"  }}'
```

* [ Output ](#tab-panel-94)
* [ Raw response ](#tab-panel-95)

![Custom Dimensions](https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/alibaba__wan-2.6-image/custom-dimensions.png) 

```
{  "gatewayMetadata": {    "keySource": "Unified"  },  "result": {    "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/35/20260417/c057796c/3257252-vy1GbNI6_bc223e38c5b4.png"  },  "state": "Completed"}
```

**Square Format**  — Square image for social media or product photos 

* [ TypeScript ](#tab-panel-100)
* [ cURL ](#tab-panel-101)

TypeScript

```
const response = await env.AI.run(  'alibaba/wan-2.6-image',  {    prompt:      'A sleek wireless headphone on a minimalist white marble surface with soft studio lighting',    size: '1024x1024',  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "alibaba/wan-2.6-image",  "input": {    "prompt": "A sleek wireless headphone on a minimalist white marble surface with soft studio lighting",    "size": "1024x1024"  }}'
```

* [ Output ](#tab-panel-98)
* [ Raw response ](#tab-panel-99)

![Square Format](https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/alibaba__wan-2.6-image/square-format.png) 

```
{  "gatewayMetadata": {    "keySource": "Unified"  },  "result": {    "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/84/20260417/c057796c/18355039-RFkWcHgG_0dcb1c1d6d95.png"  },  "state": "Completed"}
```

**Negative Prompt**  — Guide generation away from unwanted elements 

* [ TypeScript ](#tab-panel-104)
* [ cURL ](#tab-panel-105)

TypeScript

```
const response = await env.AI.run(  'alibaba/wan-2.6-image',  {    prompt: 'A detailed oil painting portrait of a Renaissance nobleman with intricate lace collar',    negative_prompt: 'modern clothing, photograph, blurry, low quality',  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "alibaba/wan-2.6-image",  "input": {    "prompt": "A detailed oil painting portrait of a Renaissance nobleman with intricate lace collar",    "negative_prompt": "modern clothing, photograph, blurry, low quality"  }}'
```

* [ Output ](#tab-panel-102)
* [ Raw response ](#tab-panel-103)

![Negative Prompt](https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/alibaba__wan-2.6-image/negative-prompt.png) 

```
{  "gatewayMetadata": {    "keySource": "Unified"  },  "result": {    "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/53/20260417/c057796c/26097304-eVhNm6uS_edc041cd5e2b.png"  },  "state": "Completed"}
```

**Portrait Format**  — Tall vertical image for portraits 

* [ TypeScript ](#tab-panel-108)
* [ cURL ](#tab-panel-109)

TypeScript

```
const response = await env.AI.run(  'alibaba/wan-2.6-image',  {    prompt: 'An elegant Art Deco poster featuring a jazz singer under a spotlight',    size: '768x1024',  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "alibaba/wan-2.6-image",  "input": {    "prompt": "An elegant Art Deco poster featuring a jazz singer under a spotlight",    "size": "768x1024"  }}'
```

* [ Output ](#tab-panel-106)
* [ Raw response ](#tab-panel-107)

![Portrait Format](https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/alibaba__wan-2.6-image/portrait-format.png) 

```
{  "gatewayMetadata": {    "keySource": "Unified"  },  "result": {    "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/5a/20260417/c057796c/79957405-YTXQsRY6_8d8a6631f1d6.png"  },  "state": "Completed"}
```

## Parameters

* [ Input ](#tab-panel-110)
* [ Output ](#tab-panel-111)

prompt

`string`required

size

`string`pattern: ^\\d+x\\d+$

negative\_prompt

`string`

image

`string`format: uri

## API Schemas (Raw)

Input [ ](https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/schema-input.json "Open") [ ](https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/schema-input.json "Download") 

Output [ ](https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/schema-output.json "Open") [ ](https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/schema-output.json "Download")

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/#page","headline":"Wan 2.6 Image (Alibaba) · Cloudflare AI docs · Cloudflare AI docs","description":"Alibaba's Wan 2.6 text-to-image model generating images from text prompts with optional negative prompts and customizable dimensions.","url":"https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/","inLanguage":"en","image":"https://developers.cloudflare.com/dev-products-preview.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/ai/","name":"AI"}},{"@type":"ListItem","position":3,"item":{"@id":"/ai/models/","name":"Models"}}]}
```
