Qwen Image Fast

Qwen-Image expertly generates stunning images with complex text integration, especially for Chinese typography.


API

If you're looking for an API, you can choose from your desired programming language.

POST
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 27 28 29 30 31 32 33 34 35 36 37 38 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') # Use this function to convert a list of image URLs to base64 def image_urls_to_base64(image_urls): return [image_url_to_base64(url) for url in image_urls] api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/qwen-image-fast" # Request payload 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 } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
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.

Resources to get you started

Everything you need to know to get the most out of Qwen Image Fast

Guide to Using the Image Generation Model Effectively

This guide covers best practices and recommended settings for a variety of use cases. Adjust the parameters below to find the ideal balance between creativity, quality, and performance.

1. Crafting Your Prompt

  • •Be concise but descriptive: focus on lighting, color, mood, and subject.
  • •Example: “A misty mountain valley at sunrise with golden light filtering through pine trees.”

2. Steps (1–16)

  • •Controls the number of refinement iterations.
  • •8–12 steps: fast previews, moderate quality.
  • •12–16 steps: highest detail, longer processing time.
  • •Recommendation: start at 10, increase if you need sharper details.

3. Seed

  • •seed = -1: each generation is unique.
  • •fixed seed (e.g., 42): reproducible outputs for consistent batches.
  • •Use fixed seeds when you need the same style across multiple runs.

4. Guidance Scale (1.0–20.0) [Advanced]

  • •Lower (1.0–3.0): more creative, can deviate from prompt.
  • •Medium (3.0–7.0): balanced adherence and creativity.
  • •High (7.0–12.0+): very literal to prompt, less variation.
  • •Default: 3.0 for general use.

5. Aspect Ratio

  • •16:9 – Cinematic scenes, desktop wallpapers
  • •1:1 – Social media posts (Instagram)
  • •9:16 – Mobile wallpapers, vertical stories
  • •4:3, 3:2, etc. – Standard print or gallery formats

6. Image Format

  • •png – Lossless, best for graphics and transparency
  • •jpeg – Smaller file size, ideal for web photos
  • •webp – Good compression with quality retention

7. Quality (10–100)

  • •80–90: web use, fast download
  • •90–100: print media, high fidelity
  • •Lower values speed up generation and reduce file size.

8. Base64 Output [Advanced]

  • •Enable for embedding images directly in HTML/CMS.
  • •Disable for saving as standalone files or URLs.

Recommended Settings by Use Case

  1. •

    Web Thumbnail

    • •Prompt: “Bright product shot on white background.”
    • •Steps: 8, Guidance: 5.0, Quality: 80, Format: jpeg, AspectRatio: 1:1
  2. •

    High-Quality Print

    • •Prompt: “Detailed watercolor portrait of a fox in autumn.”
    • •Steps: 14, Guidance: 7.0, Quality: 100, Format: png, AspectRatio: 4:3
  3. •

    Social Media Post

    • •Prompt: “Vibrant smoothie bowl overhead shot, flat lay.”
    • •Steps: 10, Guidance: 4.5, Quality: 90, Format: webp, AspectRatio: 1:1
  4. •

    Storybook Illustration

    • •Prompt: “Whimsical woodland scene with fairies by a stream.”
    • •Steps: 12, Guidance: 3.0, Quality: 95, Format: png, AspectRatio: 3:2
  5. •

    Cinematic Artwork

    • •Prompt: “Epic space battle with neon starships and laser trails.”
    • •Steps: 16, Guidance: 6.0, Quality: 100, Format: png, AspectRatio: 16:9

Experiment by tweaking one parameter at a time. Save your favorite seeds and settings to build a consistent visual library. Happy generating!

Other Popular Models

Discover other models you might be interested in.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.