Qwen Image Edit Plus
Qwen Image Edit Plus revolutionizes multi-image editing with precise transformations and facial consistency.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/qwen-image-edit-plus"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-resources.s3.amazonaws.com/input/c9e0ba47-d061-44fd-91e0-c9c55eed07fb-img2-qime.jpg",
12 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5bacb90c-f157-4dec-9ea8-7a02052206a0-image1-ip.png",
13 "image_3": null,
14 "prompt": "The woman from image 2 is sitting on the sofa, smiling and waving, in the scene from image 1",
15 "aspect_ratio": "match_input_image",
16 "go_fast": true,
17 "seed": 760941192,
18 "image_format": "webp",
19 "quality": 90,
20 "base64": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/qwen-image-edit-plus"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "image": "https://segmind-resources.s3.amazonaws.com/input/c9e0ba47-d061-44fd-91e0-c9c55eed07fb-img2-qime.jpg",
12 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5bacb90c-f157-4dec-9ea8-7a02052206a0-image1-ip.png",
13 "image_3": null,
14 "prompt": "The woman from image 2 is sitting on the sofa, smiling and waving, in the scene from image 1",
15 "aspect_ratio": "match_input_image",
16 "go_fast": true,
17 "seed": 760941192,
18 "image_format": "webp",
19 "quality": 90,
20 "base64": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text)API Endpoint
https://api.segmind.com/v1/qwen-image-edit-plusParameters
imagerequiredstring (uri)Input Image URL or file reference.
image_2requiredstring (uri)Input Image URL or file reference.
image_3requiredstring (uri)Input Image URL or file reference.
promptrequiredstringDescribes what to edit in the image
aspect_ratiooptionalstringDefines frame aspect ratio.
"match_input_image""1:1""16:9""9:16""4:3""3:4""3:2""2:3""match_input_image"base64optionalbooleanOutputs base64. True if image as text needed.
falsego_fastoptionalbooleanActivates faster image generation. Disable for quality over speed.
trueimage_formatoptionalstringChoose format for image storage. 'jpeg' for compact files, 'png' for clarity.
"webp""png""jpeg""webp"qualityoptionalintegerSets image detail level. Use 80 for web content, 100 for high-quality prints.
90Range: 10 - 100seedoptionalintegerSeed stabilizes output. Try -1 for randomness.
760941192Range: -1 - 999999999999999Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out