For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

Material Swap

This could involve changing the type of material used for a particular element, such as switching from wood to metal for a furniture piece or from traditional tiles to marble for a flooring surface.

ENDPOINT

POST /material_swap

An API URL would be like https://homedesigns.ai/api/v2/material_swap

Replace materials on surfaces to explore different textures and finishes.

An API request must be in the form-data format.

Request

Parameters & Data Type
Value
Description

image

file[ .jpg, .jpeg, .png] / base64 Image string

-

The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. (Required Parameter)

masked_image file[ .jpg, .jpeg, .png] / base64 Image string

-

The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. Click Here to generate a mask image Video Tutorial. (Required Parameter)

no_design

integer

Min - 2, Max - 5

Specifies the number of design variations you want the API to generate. The minimum is 2 and the maximum is 5. (Required Parameter)

texture_image

file[ .jpg, .jpeg, .png] / base64 Image string

The texture image should be uploaded according to your preference.

The image to be processed by the API.

(Required Parameter)

no_of_texture

The number of textures must be either The number of textures must be either 1 X 1, 2 X 2, 3 X 3, 4 X 4, 5 X 5.

The number of textures can be changed according to your preference. (Required Parameter)

prompt null or string

Custom Prompt

An optional parameter that allows users to provide a descriptive guide for the AI, This could involve changing the material of a specific element, such as replacing wood with metal for a furniture piece or switching traditional tiles to marble flooring. Users can also upload a texture or reference image along with a descriptive prompt. The AI will analyze both the texture image and the user's instructions to understand the desired material, finish, pattern, and overall design changes, then generate a new image that accurately reflects the requested modifications while maintaining a realistic and cohesive appearance.

Last updated

Was this helpful?