Image GenerationWan Image
Wan Image 2.7
Alibaba's Wan 2.7 image generation and editing model with thinking mode.
POST /v2/images/generate — model: "wan-image-2.7"
Wan Image 2.7 is Alibaba's latest multimodal image model supporting both text-to-image generation and image editing. It introduces thinking mode for more deliberate composition. 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 |
|---|---|---|
wanImage27Params.image | string | Reference image URL (optional — omit for text-to-image, provide for image editing) |
wanImage27Params.aspect_ratio | string | Aspect ratio. Values: "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", "21:9" |
wanImage27Params.seed | integer | Seed for reproducibility (0–2147483647) |
wanImage27Params.thinking_mode | boolean | Enable thinking mode for more deliberate composition (default: true for text-to-image) |
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 serene mountain lake at sunrise with misty peaks reflected in still water",
"model": "wan-image-2.7",
"wanImage27Params": {
"aspect_ratio": "16:9",
"thinking_mode": true
}
}'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 serene mountain lake at sunrise with misty peaks reflected in still water",
"model": "wan-image-2.7",
"wanImage27Params": {
"aspect_ratio": "16:9",
"thinking_mode": True,
},
},
)
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 serene mountain lake at sunrise with misty peaks reflected in still water",
model: "wan-image-2.7",
wanImage27Params: { aspect_ratio: "16:9", thinking_mode: true },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it