Qwen Image Edit Plus Texture Apply Serverless API
Apply precise textures to images using natural language.
POST /v2/qwen-image-edit-plus-texture-apply ยท submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "qwen-image-edit-plus-texture-apply",
9 prompt="Create an abstract wallpaper with vivid colors.",
10 image_1="https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
11 image_2="https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
12 lora="texture_apply",
13 aspect_ratio="4:5",
14 seed=87568756,
15 image_format="webp",
16 quality=95,
17 base64=False,
18)
19print(result["status"]) # COMPLETED
20print(result.get("output")) # model output (e.g. media URL)
21print(result["metrics"]["inference_time"]) # server compute seconds
22
23# --- Or submit + poll manually (track request_id, control the cadence) ---
24from segmind import SegmindClient, InferenceFailed, InferenceTimeout
25
26client = SegmindClient() # reads SEGMIND_API_KEY
27payload = {
28 "prompt": "Create an abstract wallpaper with vivid colors.",
29 "image_1": "https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
30 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
31 "lora": "texture_apply",
32 "aspect_ratio": "4:5",
33 "seed": 87568756,
34 "image_format": "webp",
35 "quality": 95,
36 "base64": False,
37}
38job = client.submit_async("qwen-image-edit-plus-texture-apply", **payload)
39print(job.request_id) # available immediately
40try:
41 result = job.wait(timeout=600, interval=1.0)
42except InferenceTimeout as e:
43 print("still running:", e.request_id)
44except InferenceFailed as e:
45 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "qwen-image-edit-plus-texture-apply",
9 prompt="Create an abstract wallpaper with vivid colors.",
10 image_1="https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
11 image_2="https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
12 lora="texture_apply",
13 aspect_ratio="4:5",
14 seed=87568756,
15 image_format="webp",
16 quality=95,
17 base64=False,
18)
19print(result["status"]) # COMPLETED
20print(result.get("output")) # model output (e.g. media URL)
21print(result["metrics"]["inference_time"]) # server compute seconds
22
23# --- Or submit + poll manually (track request_id, control the cadence) ---
24from segmind import SegmindClient, InferenceFailed, InferenceTimeout
25
26client = SegmindClient() # reads SEGMIND_API_KEY
27payload = {
28 "prompt": "Create an abstract wallpaper with vivid colors.",
29 "image_1": "https://segmind-resources.s3.amazonaws.com/input/b867774a-9e1e-4e4d-97bd-a58a2a7dda46-71REuLDVgVL._AC_UF8941000_QL80_.jpg",
30 "image_2": "https://segmind-resources.s3.amazonaws.com/input/5fc29fb9-0fe9-46bd-8e09-38915d7bd18d-Oxford_Pink_Flat.jpg",
31 "lora": "texture_apply",
32 "aspect_ratio": "4:5",
33 "seed": 87568756,
34 "image_format": "webp",
35 "quality": 95,
36 "base64": False,
37}
38job = client.submit_async("qwen-image-edit-plus-texture-apply", **payload)
39print(job.request_id) # available immediately
40try:
41 result = job.wait(timeout=600, interval=1.0)
42except InferenceTimeout as e:
43 print("still running:", e.request_id)
44except InferenceFailed as e:
45 print("failed:", e.detail)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
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/qwen-image-edit-plus-texture-applySubmit โ returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll โ until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result โ final response body
Status states
- A FAILED request is served as HTTP 422 โ the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
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