Skip to content
Alibaba logo

Wan 2.6 Image

Text-to-ImageAlibabaProxied

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 Licenselink
More informationlink
PricingView pricing in the Cloudflare dashboard

Usage

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

Examples

Custom Dimensions — Specify image size in WxH format
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',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Custom Dimensions
Square Format — Square image for social media or product photos
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',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Square Format
Negative Prompt — Guide generation away from unwanted elements
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',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Negative Prompt
Portrait Format — Tall vertical image for portraits
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',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Portrait Format

Parameters

prompt
stringrequired
size
stringpattern: ^\d+x\d+$
negative_prompt
string

API Schemas (Raw)

Input
Output