Wan 2.6 Image
Text-to-Image • Alibaba
alibaba/wan-2.6-image
- Third-party
- Zero data retention
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 ↗ |
| More information | link ↗ |
| Zero data retention | Yes |
| Pricing | <ul><li>Per image$0.03</li></ul> |
Usage
const response = await env.AI.run(
'alibaba/wan-2.6-image',
{ prompt: 'A golden retriever puppy playing in autumn leaves' },
)
console.log(response)
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"
}
}'

{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/66/20260417/c057796c/32701268-BbftSa6r_189314ac1a36.png"
},
"state": "Completed"
}
Examples
<details>
<summary>Custom Dimensions — Specify image size in WxH format</summary>
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)
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"
}
}'

{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/35/20260417/c057796c/3257252-vy1GbNI6_bc223e38c5b4.png"
},
"state": "Completed"
}
</details>
<details>
<summary>Square Format — Square image for social media or product photos</summary>
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)
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"
}
}'

{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/84/20260417/c057796c/18355039-RFkWcHgG_0dcb1c1d6d95.png"
},
"state": "Completed"
}
</details>
<details>
<summary>Negative Prompt — Guide generation away from unwanted elements</summary>
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)
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"
}
}'

{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/53/20260417/c057796c/26097304-eVhNm6uS_edc041cd5e2b.png"
},
"state": "Completed"
}
</details>
<details>
<summary>Portrait Format — Tall vertical image for portraits</summary>
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)
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"
}
}'

{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/5a/20260417/c057796c/79957405-YTXQsRY6_8d8a6631f1d6.png"
},
"state": "Completed"
}
</details>
Parameters
prompt
stringrequired
size
stringpattern: ^\d+x\d+$
negative_prompt
string
image
stringformat: uri
API Schemas (Raw)
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/#page","headline":"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.","url":"https://developers.cloudflare.com/ai/models/alibaba/wan-2.6-image/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Alibaba's Wan 2.7 image-to-video model that generates videos from a reference image with optional text prompts. Supports 720P and 1080P output with durations from 2 to 15 seconds. title: Wan 2.7 I2V image: https://developers.cloudflare.com/og-docs.png
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/llms.txt
Use this file to discover all available pages before exploring further.

