POST
javascript
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 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/qwen-image-fast"; const data = { "prompt": "FASHION magazine cover featuring a stunning elegant woman, glamorous confident pose, couture dress, flawless glowing skin, luxury jewelry, cinematic studio lighting, glossy print photography aesthetic, ultra-detailed, crisp focus, only the word FASHION at the top, no other text anywhere", "steps": 8, "seed": -1, "guidance": 1, "aspect_ratio": "3:4", "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); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describe imaginative scenes for image creation.


stepsint *

Number of steps for image refinement. More steps enhance quality; 8-16 is a good range.

min : 1,

max : 16


seedint ( default: -1 )

Seed controls image uniqueness. Use -1 for new variations or a fixed number for consistency.


guidancefloat ( default: 1 )

Sets prompt adherence level. Use 1.0 for creative outcomes, 3.0 for precise results.

min : 1,

max : 20


aspect_ratioenum:str ( default: 1:1 )

Selects image shape. Use 16:9 for cinematic view, 1:1 for balanced look.

Allowed values:


image_formatenum:str ( default: png )

Choose format for image storage. 'jpeg' for compact files, 'png' for clarity.

Allowed values:


qualityint ( default: 90 )

Sets image detail level. Use 80 for web content, 100 for high-quality prints.

min : 10,

max : 100


base64bool ( default: 1 )

Outputs as base64 string for embedding. Enable for integration, disable for standalone 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.

Qwen-Image – Text-to-Image Model

What is Qwen-Image?

Qwen-Image is an advanced foundation model, belonging to the well-known Qwen series. It is designed to perform sophisticated text-to-image renditions of images with flawless text integration while maintaining high-quality results. One of the features that makes Qwen-Image a highly revered model is that it can combine images with typography, specifically Chinese characters. It ensures the authentic outcome (close to the original source) in terms of layout, context, and visuals. It is built on the Diffusers Library, which makes it an intuitive model that understands objects and performs complex image editing, and not just basic image generation.

Key Features

  • Advanced text rendering - Supports typography integration and preservation, including support for Chinese characters
  • Multi-style generation - Includes photorealistic imagery to create anime style
  • Intelligent image editing - Performs style transfer, object manipulation, and in-image text adjustments
  • Image understanding tasks - Detects objects and assesses depth
  • Flexible aspect ratios - Designed for a myriad of formats - from square social media posts to cinematic widescreen
  • Quality optimization - Delivers adjustable refinement steps and output formats

Best Use Cases

Qwen-Image is an excellent model for image editing tasks with text-heavy visual content.

  • Graphic designers use it to design posters, integrate logos, and design multilingual marketing materials.
  • E-commerce teams can generate product mock-ups with branded text overlays and promotional graphics in no time.
  • Content creators find it useful for their social media posts, creating thumbnails, and designing educational infographics.

Qwen-Image combines images with Chinese typography, making it useful for creating localization projects and Asian market campaigns. It also has a highly dynamic editing feature that supports creative workflows, hence it can perform style transfers and object modifications.

Prompt Tips and Output Quality

  • To get the best results, it is recommended to write prompts that are descriptive and abundant in creative imagination so that there is a clear focus on the scene's composition, lighting, and mood.
  • If the image needs text integration, clearly specify font styles, text positioning, and preferred language.
  • Using 8-12 steps will yield optimal quality-speed balance; higher values will improve detail but also increase processing time.
  • To achieve creative interpretations, set the guidance scale to 2.5
  • 5.0 will give precise prompt adherence.
  • The quality parameter (80-100) has a significant impact on the final output's quality in terms of sharpness and detail retention.

FAQs

Is Qwen-Image open-source? Yes, Qwen-Image is open-source, built on the Diffusers framework, a useful tool for developers and researchers.

How does it differ from other text-to-image models? Its exceptional feature is the impeccable text rendering, especially for Chinese characters. It also possesses integrated editing capabilities.

What's the optimal step count for best results? You can use "8-12 steps" for most of the applications. But if you need marginal quality improvements, go with higher values (up to 16) - at increased processing cost.

Can I generate consistent images? Yes, you can generate reproducible outputs across multiple generations by using a fixed seed value instead of -1.

What aspect ratios work best? You can get the desired results by using - 16:9 for cinematic content, 1:1 for social media, and 9:16 for mobile-first designs.

Does it support batch processing? Qwen-Image is more suitable for processing single requests efficiently, and its parameters are designed to produce individual high-quality outputs.