Qwen Image Edit Fast
Qwen-Image-Edit enables precise bilingual image editing for seamless localization and professional content creation.
API
If you're looking for an API, you can choose from your desired programming language.
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-edit-fast"
# Request payload
data = {
"image": image_url_to_base64("https://segmind-resources.s3.amazonaws.com/input/354cdf06-8901-4f0c-a9e0-8bf72bcb2859-5769d60b13eeba42135ff0c65db49c14.png"), # Or use image_file_to_base64("IMAGE_PATH")
"prompt": "Change '1000$' to '5$' in the poster",
"steps": 8,
"guidance": 1,
"seed": 760941192,
"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
Attributes
Input Image URL or file reference. Use a recognizable sign for editing text.
Describes what to edit in the image. Be clear about text changes or other edits needed.
Defines the precision of editing. Use 8 for balanced speed and quality.
min : 1,
max : 20
Controls adherence to prompt. Set 4 for stronger influence on changes.
min : 1,
max : 25
Ensures reproducibility of edits. Use -1 for random creative results.
min : -1,
max : 999999999999999
Choose format for image storage. 'jpeg' for compact files, 'png' for clarity.
Allowed values:
Sets image detail level. Use 80 for web content, 100 for high-quality prints.
min : 10,
max : 100
Outputs image as text. Set true if integration with text-based systems needed.
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 Edit Fast
# Qwen Image Edit Guide
This guide outlines best practices and parameter recommendations for using the Qwen Image Edit model on Segmind. By adjusting key settingsâ`steps`, `guidance`, `seed`, and `base64`âyou can optimize for speed, quality, creativity, or reproducibility.
---
## 1. Core Inputs
- **image** (required): URL or file reference of the source image.
- **prompt** (required): A clear, concise description of edits. E.g., âreplace the text on sign board with âWelcome to Qwen Image Edit on Segmindâ.â
---
## 2. Key Parameters
1. **steps** (int, 1â20)
- Controls the number of diffusion iterations.
- Default: 8 for balanced speed & quality.
- Lower (1â4): Fast, but rough results.
- Higher (12â20): Finer details at the cost of longer runtime.
2. **guidance** (float, 1â25)
- Adjusts how strictly the model follows your prompt.
- Default: 1 (light guidance).
- Increase to ~4â8 for stronger adherence to text or precise edits.
- Values above 12 can produce overfitting or artifacts.
3. **seed** (int, â1 or [0 to 1e15])
- Controls randomness and reproducibility.
- Set `seed = â1` for entirely random, creative outputs each run.
- Use a fixed positive seed (e.g., 760941192) to replicate the same result.
4. **base64** (boolean)
- If `true`, returns the edited image as a Base64 string.
- Ideal for text-based workflows or APIs that embed images in payloads.
- Default: `false` delivers a standard image file link.
---
## 3. Recommended Settings by Use Case
| Use Case | steps | guidance | seed | base64 |
|------------------------|-------|----------|-----------|--------|
| Quick Mockups | 4 | 1 | â1 | false |
| Precise Text Replacements | 8 | 4 | 123456789 | false |
| High-Fidelity Edits | 15 | 6 | 987654321 | false |
| Creative Variations | 12 | 2 | â1 | false |
| API/Text Integration | 8 | 4 | 555000444 | true |
---
## 4. Tips for Best Results
- Be explicit in the **prompt**: mention exact wording, font style, or color when editing text.
- Preview with low `steps` before scaling up.
- Lock down the **seed** for consistent A/B testing.
- Gradually increase **guidance** to avoid unnatural artifacts.
- Use **base64** when embedding images in JSON responses.
By tailoring these parameters, you can harness Qwen Image Editâs full powerâwhether you need rapid mockups, precise signboard updates, or imaginative transformations. Happy editing!
Other Popular Models
Discover other models you might be interested in.
faceswap-v2
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training

sdxl1.0-txt2img
The SDXL model is the official upgrade to the v1.5 model. The model is released as open-source software

sd1.5-majicmix
The most versatile photorealistic model that blends various models to achieve the amazing realistic images.

sd2.1-faceswapper
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training
