Wan 2.6 Image
Text-to-Image • Alibaba • ProxiedAlibaba'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 ↗ |
Usage
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)Examples
Custom Dimensions — Specify image size in WxH format
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)Square Format — Square image for social media or product photos
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)Negative Prompt — Guide generation away from unwanted elements
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)Portrait Format — Tall vertical image for portraits
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)Parameters
stringrequiredstringpattern: ^\d+x\d+$stringnumberconst: 1stringformat: uriAPI Schemas
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string" }, "size": { "type": "string", "pattern": "^\\d+x\\d+$" }, "negative_prompt": { "type": "string" }, "n": { "type": "number", "const": 1 } }, "required": [ "prompt" ], "additionalProperties": false}{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri" } }, "required": [ "image" ], "additionalProperties": false}