Qwen Image Edit Plus

Qwen Image Edit Plus revolutionizes multi-image editing with precise transformations and facial consistency.

~13.39s
$0.035 per generation
 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

POSThttps://api.segmind.com/v1/qwen-image-edit-plus

Parameters

imagerequired
string (uri)

Input Image URL or file reference.

image_2required
string (uri)

Input Image URL or file reference.

image_3required
string (uri)

Input Image URL or file reference.

promptrequired
string

Describes what to edit in the image

aspect_ratiooptional
string

Defines frame aspect ratio.

Default: "match_input_image"
Allowed values :
"1:1""16:9""9:16""4:3""3:4""3:2""2:3""match_input_image"
base64optional
boolean

Outputs base64. True if image as text needed.

Default: false
go_fastoptional
boolean

Activates faster image generation. Disable for quality over speed.

Default: true
image_formatoptional
string

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

Default: "webp"
Allowed values :
"png""jpeg""webp"
qualityoptional
integer

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

Default: 90Range: 10 - 100
seedoptional
integer

Seed stabilizes output. Try -1 for randomness.

Default: 760941192Range: -1 - 999999999999999

Response Type

Returns: Image

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out