POST
javascript
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 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/qwen-image-edit-plus-texture-extract"; const data = { "prompt": "Extract stone texture from the wall. Extract into a texture image.", "image_1": "toB64('https://segmind-resources.s3.amazonaws.com/input/73db8f48-bbbb-43e9-8758-ed99c88c3654-08-scaled.jpg')", "image_2": "toB64('')", "image_3": "toB64('')", "lora": "texture_extract", "aspect_ratio": "1:1", "seed": 87568756, "image_format": "webp", "quality": 95, "base64": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describe the desired image. Use specific details for tailored outputs, like 'sunset over mountains' for nature scenes.


image_1image ( default: 1 )

Upload a base image. Use landscape images for scenery edits, portraits for fashion edits.


image_2image ( default: 1 )

Add a secondary image for blending. Ideal for combining images like cityscapes with skies.


image_3image ( default: 1 )

Use a tertiary image for texture layering. Choose textures like rust or water for creative effects.


loraenum:str ( default: texture_extract )

Select a LoRA model for texture extraction. Use 'texture_extract' for detailed texture effects.

Allowed values:


lora_2_urlstr ( default: 1 )

Include an additional LoRA model URL. Useful for specialized effects like artistic filters.


lora_3_urlstr ( default: 1 )

Include another LoRA model URL. Opt for unique URLs for intricate design blending.


aspect_ratioenum:str ( default: 1:1 )

Set output aspect ratio. Use 'match_input_image' for consistent dimensions or select ratios like '16:9' for widescreen.

Allowed values:


seedint ( default: 87568756 )

Set a seed for reproducible results. Use -1 for random outcomes.

min : -1,

max : 2147483647


image_formatenum:str ( default: webp )

Choose image output format. 'webp' is efficient; choose 'jpeg' or 'png' for compatibility.

Allowed values:


qualityint ( default: 95 )

Set image quality. Use '95' for high quality and '80' for web optimization.

min : 1,

max : 100


base64bool ( default: 1 )

Get output as a base64 string. Use for easy web embedding.

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.

Extract Texture Qwen Image Edit 2509: Texture Extraction Model

What is Extract Texture Qwen Image Edit 2509?

Extract Texture Qwen Image Edit 2509 is a specialized image-to-image AI model built on Qwen/Qwen-Image-Edit-2509 with a custom LoRA adapter fine-tuned for texture extraction. This model excels at isolating and generating clean, repeatable texture patterns from photographs—transforming images of stone walls, fabric surfaces, birch tree bark, or wood panels into seamless texture maps. Designed for 3D artists, game developers, graphic designers, and digital creatives, it automates the tedious process of texture creation by intelligently extracting surface patterns while removing unwanted context and lighting variations.

Unlike general-purpose image editing models, this tool focuses specifically on pattern recognition and texture synthesis, making it ideal for workflows that require tileable textures, material libraries, or reference assets for rendering pipelines.

Key Features

  • Pattern-Aware Extraction: Automatically detects and isolates repeating surface patterns from complex photographs
  • Multi-Image Blending: Supports up to three input images for texture layering and creative compositing
  • Flexible Aspect Ratios: Offers 11 preset ratios including match_input_image, 1:1, 16:9, and custom dimensions
  • Reproducible Results: Seed control ensures consistent outputs across iterations
  • LoRA Customization: Built-in texture_extract LoRA with support for additional model URLs
  • Production-Ready Formats: Exports in JPEG, PNG, or optimized WebP with adjustable quality settings
  • Fast Inference: Powered by WaveSpeed infrastructure for efficient processing

Best Use Cases

Game Development: Generate tileable brick, concrete, metal, and organic textures for environment assets and PBR material workflows.

Architectural Visualization: Extract realistic building material textures—marble, wood grain, stone cladding—directly from reference photos.

Graphic Design: Create seamless background patterns, fabric swatches, and surface textures for print or digital design projects.

3D Modeling & Rendering: Build custom material libraries with extracted textures for Blender, Unreal Engine, or Unity pipelines.

Digital Art & Concept Design: Synthesize unique surface patterns for matte paintings, texture brushes, and stylized artwork.

Prompt Tips and Output Quality

Be Specific About Material Type: Instead of "texture," write "rough granite stone texture" or "weathered oak wood grain pattern" for targeted extraction.

Describe Pattern Characteristics: Include adjectives like "repeating," "seamless," "weathered," or "smooth" to guide pattern recognition.

Mention Surface Context: Phrases like "close-up brick wall texture" or "tree bark surface detail" help the model understand scale and focus.

Use Seed Values: Set a specific seed (not -1) when iterating on prompts to isolate the impact of text changes versus random variation.

Experiment with Aspect Ratios: Use 1:1 or 4:5 for square texture tiles; 16:9 or 21:9 for banner-style pattern strips.

Layer Multiple Images: Combine a base texture photo (image_1) with color references (image_2) and overlay patterns (image_3) for complex material effects.

Optimize Export Settings: Use WebP at quality 95 for the best compression-to-detail ratio, especially for large texture libraries.

FAQs

What makes this model different from standard image editors?
Unlike Photoshop or GIMP, this AI model understands texture semantics—it automatically identifies repeating patterns, removes perspective distortion, and generates seamless outputs without manual editing or clone stamping.

Can I use this for commercial texture packs?
The model itself is free to use via Segmind's infrastructure. Rights to generated textures depend on your input images—ensure you own or have licenses for source photographs before commercial distribution.

Do I need to provide perfectly lit or centered photos?
No. The model handles varied lighting, angles, and compositions, though clearer source images with visible patterns yield better results. Avoid heavily shadowed or blurred inputs.

How do I create seamless tileable textures?
Describe the texture as "repeating" or "seamless" in your prompt, and use 1:1 aspect ratio. For post-processing, use the seed parameter to generate variations, then blend in editing software if needed.

What's the difference between the three image inputs?
Image_1 is your primary texture source. Image_2 blends additional visual elements (like color grading). Image_3 adds tertiary layers (like overlays or secondary patterns) for complex compositions.

Can I add my own LoRA models?
Yes. Use lora_2_url or lora_3_url parameters to provide custom LoRA model URLs, enabling specialized effects like artistic filters or industry-specific material styles.