Image GenerationQwen Image
Qwen Image 2 Pro
Qwen's v2 Pro image generation — higher quality, Replicate only.
POST /v2/images/generate — model: "qwen-image-2-pro"
Qwen Image 2 Pro is the high-quality variant of Qwen Image 2. It uses the same parameters but produces higher-fidelity output. Available via Replicate only.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Description |
|---|---|---|
qwenImage2Params.image | string | Input image URL (optional — omit for text-to-image, provide for editing) |
qwenImage2Params.aspect_ratio | string | Aspect ratio. Values: "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", "21:9", "2:1", "1:2" |
qwenImage2Params.negative_prompt | string | Negative text prompt |
qwenImage2Params.seed | integer | Seed for reproducibility |
Credit cost
10 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 a cat wearing a tiny crown, studio lighting",
"model": "qwen-image-2-pro",
"qwenImage2Params": {
"aspect_ratio": "1:1"
}
}'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 a cat wearing a tiny crown, studio lighting",
"model": "qwen-image-2-pro",
"qwenImage2Params": {
"aspect_ratio": "1:1",
},
},
)
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 a cat wearing a tiny crown, studio lighting",
model: "qwen-image-2-pro",
qwenImage2Params: { aspect_ratio: "1:1" },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it