Image GenerationWan Image
Wan Image 2.7 Pro
Alibaba's Wan 2.7 Pro image generation and editing model with higher fidelity.
POST /v2/images/generate — model: "wan-image-2.7-pro"
Wan Image 2.7 Pro is the professional-grade variant of Alibaba's Wan 2.7 image model, offering higher fidelity output with more detailed textures and lighting. It supports text-to-image generation and image editing with thinking mode.
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
5 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 photorealistic portrait of an astronaut floating above Earth, golden hour lighting",
"model": "wan-image-2.7-pro",
"wanImage27Params": {
"aspect_ratio": "3:4",
"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 photorealistic portrait of an astronaut floating above Earth, golden hour lighting",
"model": "wan-image-2.7-pro",
"wanImage27Params": {
"aspect_ratio": "3:4",
"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 photorealistic portrait of an astronaut floating above Earth, golden hour lighting",
model: "wan-image-2.7-pro",
wanImage27Params: { aspect_ratio: "3:4", thinking_mode: true },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it