1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/qwen-image";
const data = {
"prompt": "A mystical dragon hovering above a sparkling waterfall under a starry sky.",
"negative_prompt": "blurry, cartoonish",
"steps": 30,
"seed": -1,
"guidance": 3.5,
"aspect_ratio": "16:9",
"image_format": "png",
"quality": 90,
"base64": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Describe imaginative landscapes or detailed environments for image generation. Examples: 'A mystical dragon cave' or 'rustic mountain cabin'.
Exclude elements to control results. Useful filters: 'blur' for clarity, 'cartoonish' for realism.
Number of steps for generating the image
min : 1,
max : 50
Determines image variation. Use -1 for unique images, fixed for repeatability.
Adjusts adherence to prompt. Set 2.5 for creativity, 5.0 for precision.
min : 1,
max : 20
Defines image proportion. Use 16:9 for cinematic, 1:1 for square formats.
Allowed values:
Select image format. Use 'jpeg' for small files, 'png' for quality.
Allowed values:
Set clarity level. Choose 80 for web, 100 for print quality.
min : 10,
max : 100
Outputs base64 image string. Enable for embedding, disable for files.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Last Updated: 11 Aug 2025
Qwen-Image was developed and trained by Alibaba, as a part of the broader Qwen series of large language models. The model was officially released in early August 2025. Qwen series of models primarily were LLMs that could input text and image models and output text. With Qwen-Image, the model can now generate images as well. This new model is great at complex text rendering. The Qwen image to image version (comming soon) is great at precise image editing tasks.
Qwen-Image is a **20-billion parameter model using Multimodal Diffusion Transformer (MMDiT) architecture. The architecture consists of three key components working in tandem
This model leverages a comprehensive data pipeline, progressive training strategies, and enhanced multi-task learning to achieve state-of-the-art results across multiple benchmarks.
Advanced Text Rendering: It is able to generate both English and Chinese alphabets and render them on the image. It supports simple words to multi-line rendering and even paragraph level rendering. Prior to this model, only GPT-Image from OpenAI was capable of text rendering with this precision.
Qwen-Image combines powerful general image generation capability with unmatched text rendering precision in English and Chinese. The prompt adherence is also state-of-the-art. As of today, this model is the leading open-source multimodal foundation model bridging artistic flexibility, textual accuracy, and robust editing capabilities.