Image GenerationWan Image
Wan Image 2.6
Alibaba's Wan 2.6 image generation and editing model.
POST /v2/images/generate — model: "wan-image-2.6"
Wan Image 2.6 is Alibaba's multimodal image model supporting both text-to-image generation and image editing. Omit the image parameter for text-to-image, or provide a reference image for editing.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Description |
|---|---|---|
wanImageParams.image | string | Reference image URL (optional — omit for text-to-image, provide for image editing) |
wanImageParams.aspect_ratio | string | Aspect ratio. Values: "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", "21:9" |
wanImageParams.negative_prompt | string | Negative text prompt (max 500 characters) |
wanImageParams.seed | integer | Seed for reproducibility (0–2147483647) |
wanImageParams.prompt_extend | boolean | Enable intelligent prompt rewriting (default: false) |
Credit cost
3 credits per generation.
Code examples
curl -X POST https://api.apiframe.ai/v2/images/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cyberpunk cityscape at night with neon reflections on wet streets",
"model": "wan-image-2.6",
"wanImageParams": {
"aspect_ratio": "16:9"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "A cyberpunk cityscape at night with neon reflections on wet streets",
"model": "wan-image-2.6",
"wanImageParams": {
"aspect_ratio": "16:9",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "A cyberpunk cityscape at night with neon reflections on wet streets",
model: "wan-image-2.6",
wanImageParams: { aspect_ratio: "16:9" },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it