Qwen Image Edit Plus Texture Apply Serverless API
Seamlessly applies precise textures to images based on natural language prompts for enhanced visual quality.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/qwen-image-edit-plus-texture-apply"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Create an abstract wallpaper with vivid colors.",
12 "image_1": "https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
13 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
14 "lora": "texture_apply",
15 "aspect_ratio": "4:5",
16 "seed": 87568756,
17 "image_format": "webp",
18 "quality": 95,
19 "base64": false
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/qwen-image-edit-plus-texture-apply"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Create an abstract wallpaper with vivid colors.",
12 "image_1": "https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
13 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
14 "lora": "texture_apply",
15 "aspect_ratio": "4:5",
16 "seed": 87568756,
17 "image_format": "webp",
18 "quality": 95,
19 "base64": false
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text)API Endpoint
https://api.segmind.com/v1/qwen-image-edit-plus-texture-applyParameters
promptrequiredstringDescribe the image edit or generation task. Use descriptive prompts for best results.
"A beautiful photo"aspect_ratiooptionalstringSelect output image aspect ratio. 'Match input' keeps original proportions.
"match_input_image""1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9""21:9"+1 morebase64optionalbooleanReturn image as base64. Useful for embedding images in JSON.
falseimage_1optionalstring (uri)Add a primary image for editing. Use URLs for easy access to online images.
image_2optionalstring (uri)Include a secondary image if needed. Useful for compositing multiple images.
image_3optionalstring (uri)Insert a third image optionally. Great for complex projects needing more images.
""image_formatoptionalstringChoose output format. 'WEBP' is great for quality and compression.
"webp""jpeg""png""webp"loraoptionalstringApply a predefined LoRA model. 'texture_apply' works for texture enhancements.
"texture_apply""texture_apply"lora_2_urloptionalstringProvide URL for an additional LoRA model. Use for custom LoRA model integration.
""lora_3_urloptionalstringInclude a third LoRA model via URL. Suitable for advanced users with multiple models.
""qualityoptionalintegerSet output quality. Use higher values for better quality, 95 is a good balance.
95Range: 1 - 100seedoptionalintegerSet seed for repeatability. Use -1 for uniqueness each time.
87568756Range: -1 - 2147483647Response 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