API Documentation
  • Introduction
  • API Reference
  • 🔐Authentication
  • Core APIs
    • Perfect Redesign
    • Beautiful Redesign
    • Creative Redesign
    • Sketch to Render
    • Virtual staging
    • Precision
    • Fill Spaces
    • Decor Staging
    • Furniture Removal
    • Colors & Textures
    • Furniture Finder
    • Full HD
    • Text to design
    • Furniture Creator
    • Design Advisor
    • Sky Colors
    • Design Transfer
    • Floor Editor
    • Paint Visualizer
    • Material Swap
    • Room Composer
    • Design Critique
    • Create Mask Image
    • Download Generated Images
    • Smart Home AI
  • DESIGN SCOPE
    • Interiors
      • Design Styles for Interiors
      • Room Types
      • Colors in Interior Design
      • Explore Material Options for Interior Designs
    • Exteriors
      • Design Styles for Exteriors
      • Copy of Design Styles for Exteriors
      • House angles
      • Exterior Colors
      • Material Options for Exterior Designs
    • Gardens
      • Design Styles for Gardens
      • Garden Types
      • Explore Color Options for Garden Designs
      • Material Options for Garden Designs
  • Data
    • User Details
    • Design Scope
  • Others
    • What is Masked Image?
Powered by GitBook
On this page
  • ENDPOINT
  • How our Color and Texture API should work?
  • Case 1: Changing Color Only
  • Case 2: Changing Materials Only
  • Case 3: Changing Materials with Specific Color
  • Custom Changes Using Prompt
  • Case 1: Custom Color Using Prompt
  • Case 2: Custom Materials and Materials_Type Using Prompt
  • Case 3: Custom Materials, Materials_Type, and Specific Color Using Prompt
  • What is Masked Image?

Was this helpful?

  1. Core APIs

Colors & Textures

The "/change_color_textures" endpoint utilizes sophisticated AI algorithms to modify the colors and textures of structural components, decor items, and furniture pieces within any given image. This feature is particularly useful for interior designers, architects, and homeowners looking to visualize various aesthetic options before making final decisions. By providing an intuitive interface for color and texture customization, it empowers users to creatively explore and implement design modifications, enhancing the overall appearance and feel of their spaces.

ENDPOINT

POST /change_color_textures

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

This element seamlessly alters the colours and textures of the structural elements, decor, and furniture in the images.

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

Request

Parameters & Data Type
Value
Description

design_type

string

Interior, Exterior, Garden

Specifies the type of area you want to design. API users must specify whether they are designing an interior space, an exterior area, or a garden. (Required Parameter)

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

-

no_design

integer

Min - 1, Max - 4

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

prompt

null or string

Custom Prompt

An optional parameter that allows users to provide a descriptive guide for the AI, helping it understand the specific design changes desired. This could include details like the item to be modified (e.g., 'black table') and its material composition (e.g., 'made out of hardwood'), enabling more accurate and tailored design generation. (Prompt or color or materials are required.)

color

null or string

White, Off White, Cream, Ivory, Beige, Light Gray, Medium Gray, Charcoal Black, Taupe, Light Brown ..etc.

This parameter enables users to specify the color to be applied to the structural element, decor, or furniture in the image. Users can choose from a wide palette of colors, allowing for precise matching or the exploration of new color schemes to enhance the item's appearance in the design. (Prompt or color or materials are required.)

materials null or string

Fabrics, Glass, Wood, Stone, Metal, Ceramics and Porcelain, Plastics and Polymers, Paper and Cardboard, Natural Fibers, Composite Materials

This parameter allows users to select from a variety of materials to apply to the item being modified. Options include but are not limited to fabrics, glass, wood, and stone. Selecting a material helps the AI to accurately replicate the texture and look of the item as per the user's preference, ensuring a realistic modification. (Prompt or color or materials are required.)

materials_type null or string

Wallpaper, Cardboard, Kraft, Parchment, Foil embossed, Textured, Handmade paper, Recycled paper, Flocked paper, Metallic paper, Vellum, Linen paper, Watercolor paper, Matte, Glossy

A secondary parameter that provides further detail on the selected material. Depending on the primary material choice, this parameter allows users to specify the finish or texture, such as 'textured', 'foil embossed', 'handmade paper', 'recycled plastic', 'linen paper', or 'matte metallic'. This level of detail ensures that the modifications not only change the material but also accurately reflect its specific characteristics, adding depth and authenticity to the design

object string

Required if prompt is Provided.

object names that are available in given image, [wall, floor, ceiling, etc.]

Parameters & Errors

image

Error Messages
Reason

Image field required

Image not provided

Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.

Image Size must be greater than 786X786.

Invalid image format. Only PNG, JPEG and JPG images are allowed.

Image Format not valid.

masked_image

Error Messages
Reason

masked_image field required

masked_image not provided

Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.

masked_image Size must be greater than 786X786.

Invalid image format. Only PNG, JPEG and JPG images are allowed.

masked_image Format not valid.

prompt/(color, materials, materials_type)

Error Messages
Reason

prompt field required (if color, materials, materials_type are not provided)

Either prompt or color, materials, and materials_type must be provided.

color

Error Messages
Reason

color field required (if prompt is not provided)

Either prompt or color, materials, and materials_type must be provided.

color value is not a valid enumeration member; permitted: White, Black, Grey, Blue, Red etc.

Color must be accurate from the provided suggesions.

materials

Error Messages
Reason

materials field required (if prompt is not provided)

Either prompt or color, materials, and materials_type must be provided.

materials value is not a valid enumeration member; permitted: Fabrics, Glass, Wood, Stone, Metal, Ceramics and Porcelain, Plastics and Polymers, Paper and Cardboard, Natural Fibers, Composite Materials

materials must be accurate from the provided suggesions.

materials_type

Error Messages
Reason

materials_type field required (if prompt is not provided)

color, materials, and materials_type are required. If you're not providing prompt.

materials_type should be in [Cotton, Linen, Silk, Velvet, Wool, Leather, Suede, Tweed, Chenille, Jacquard, Satin, Polyester, Nylon, Rayon, Cashmere]

materials_type must be accurate from the provided suggesions.

Object

Error Messages
Reason

object field required

object not provided.

//Output should be in list of array depends on no of designs as shown below:

{
    "input_image": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/APIUser/input-20240215-102806078081.png",
    "output_images": [
        "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/APIUser/20240215-102806078081-1.png"
    ]
}

How our Color and Texture API should work?

Here are some use cases of the Color and Texture modules API and how it will work.

Case 1: Changing Color Only

  • Payload Requirements: Only pass the color parameter.

  • Exclude: Do not pass materials, materials_type, and prompt.

Case 2: Changing Materials Only

  • Payload Requirements: Pass both materialsand materials_typeparameters.

  • Exclude: Do not pass color and prompt.

Case 3: Changing Materials with Specific Color

  • Payload Requirements: Pass color, materials, and materials_typeparameters.

  • Exclude: Do not pass prompt.

Custom Changes Using Prompt

If the desired color, materials, or materials_typeis not available in the app, and you want to change part of an image, you can use the prompt parameter to handle this.

Case 1: Custom Color Using Prompt

  • Example Prompt: barbie pink

Case 2: Custom Materials and Materials_Type Using Prompt

  • Example Prompt: anthracite with white marble

Case 3: Custom Materials, Materials_Type, and Specific Color Using Prompt

  • Example Prompt: grey anthracite with white marble

PreviousFurniture RemovalNextFurniture Finder

Last updated 4 months ago

Was this helpful?

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

Note: Using such colors is not recommended, but you can use the feature if the image is of an interior type.

paint visualizer
What is Masked Image?
Click Here
Video Tutorial.
Page cover image