# Decor Staging

This decor staging endpoint enables the staging of furniture or decorative objects into various real-life scenarios, applicable to both interiors and exteriors. Upon uploading an object, the AI processes and stages it in realistic settings. This endpoint is particularly useful for furniture manufacturers and e-commerce stores, providing a tool to visualize products in different environments.

## ENDPOINT

<mark style="color:green;">**`POST`**</mark>  <mark style="color:purple;">**`/decor_staging`**</mark>

An API URL would be like <mark style="color:blue;"><https://homedesigns.ai/api/v2/decor\\_staging></mark>

{% hint style="info" %} <mark style="color:blue;">Use this endpoint to upscale the design to Full HD quality for better visualization.</mark>
{% endhint %}

{% tabs %}
{% tab title="Request" %}
{% hint style="info" %} <mark style="color:blue;">An API request must be in the</mark> <mark style="color:orange;">**`form-data`**</mark> <mark style="color:blue;">format.</mark>
{% endhint %}

### Request

<table><thead><tr><th width="232">Parameters &#x26; Data Type</th><th width="181">Value</th><th>Description</th></tr></thead><tbody><tr><td><p><mark style="color:red;"><strong><code>image</code></strong></mark>  </p><p>file[ .jpg, .jpeg, .png] / base64 Image <mark style="color:green;"><code>string</code></mark></p></td><td>-</td><td>The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. <strong>(Required Parameter)</strong> Only transparent images are allowed.</td></tr><tr><td><p><mark style="color:red;"><strong><code>design_type</code></strong></mark></p><p><mark style="color:green;"><code>string</code></mark></p></td><td>Interior, Exterior, Garden</td><td>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.  <strong>(Required Parameter)</strong></td></tr><tr><td><p><mark style="color:red;"><strong><code>no_design</code></strong></mark> </p><p><mark style="color:green;"><code>integer</code></mark></p></td><td>Min - 1, Max - 4</td><td>Specifies the number of design variations you want the API to generate. The minimum is 1 and the maximum is 4.  <strong>(Required Parameter)</strong></td></tr><tr><td><p><mark style="color:red;"><strong><code>design_style</code></strong></mark></p><p><mark style="color:green;"><code>string</code></mark></p></td><td>Design style should be as per design type. </td><td><p>Defines the overall aesthetic style you want to achieve, such as 'Bohemian', 'Industrial', 'Scandinavian', etc. </p><p> <strong>(Required Parameter)</strong></p><p>Here you can see the more design styles.</p><p><a href="../design-scope/exteriors/design-styles-for-exteriors">Interior Design Styles</a></p><p><a href="../design-scope/exteriors/design-styles-for-exteriors">Exterior Design Styles </a><br><a href="../design-scope/gardens/design-styles-for-gardens">Garden Design Styles</a></p></td></tr><tr><td><p><mark style="color:red;"><strong><code>room_type</code></strong></mark>  </p><p> <mark style="color:green;"><code>string</code></mark></p></td><td>Room style should be as per design type</td><td>Required if design_type is Interior, Indicates the type of room for which the design is intended, like 'Living Room', 'Bedroom', 'Kitchen', etc.<br><br><a href="../design-scope/interiors/room-types">Click here</a> to see more room types.</td></tr><tr><td><mark style="color:red;"><strong><code>house_angle</code></strong></mark>  <mark style="color:green;"><code>string</code></mark> </td><td>House angle should be as per design type</td><td>Required if design_type is Exterior, Indicates the angle of house for which the design is intended, like Side of House, Front of House, Back of House.<br><br><a href="../design-scope/exteriors/house-angles">Click here</a> to see more house angles.</td></tr><tr><td><mark style="color:red;"><strong><code>garden_type</code></strong></mark>   <mark style="color:green;"><code>string</code></mark></td><td>Garden type should be as per design type</td><td>Required if design_type is Garden, Indicates the type of garden for which the design is intended, like 'Backyard', 'Front Yard', 'Courtyard', etc.<br><br><a href="../design-scope/gardens/garden-types">Click here</a> to see more garden types.</td></tr><tr><td><p><mark style="color:red;"><strong><code>prompt</code></strong></mark> </p><p> <mark style="color:green;"><code>null</code></mark>  or  <mark style="color:green;"><code>string</code></mark></p></td><td>Write a Custom Prompt</td><td>An optional text prompt that can guide the AI in generating the design. This could be something like "Create a cozy and warm living room".</td></tr></tbody></table>
{% endtab %}

{% tab title="Errors" %}

### Parameters & Errors

<mark style="color:red;">**`image`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Image field required</td><td>Image not provided</td></tr><tr><td>Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.</td><td>Image Size Not Proper.</td></tr><tr><td>Invalid image format. Only PNG, JPEG and JPG images are allowed.</td><td>Image Format not valid.</td></tr></tbody></table>

<mark style="color:red;">**`masked_image`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>masked_image field required</td><td>masked_image not provided</td></tr><tr><td>Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.</td><td>masked_image Size must be greater than 786X786.</td></tr><tr><td>Invalid image format. Only PNG, JPEG and JPG images are allowed.</td><td>masked_image Format not valid.</td></tr></tbody></table>

<mark style="color:red;">**`design_type`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Design_type field required</td><td>Design type not provided</td></tr><tr><td>Design_type value is not a valid enumeration member; permitted: 'Interior', 'Exterior', 'Garden'</td><td>design type not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`room_type`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>room_type field required when design_type is Interior</td><td>room_type not provided</td></tr><tr><td>room_type should be in ['Living room', 'Bedroom', 'Bathroom'...] this array will replaced dynamically as per your design_type</td><td>room_type not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`house_angle`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>house_angle field required when design_type is Exterior</td><td>house_angle not provided</td></tr><tr><td>house_angle should be in ['Side of House', 'Front of House', 'Back of House'...] this array will replaced dynamically as per your design_type</td><td>house_angle not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`garden_type`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>garden_type field required when design_type is Garden</td><td>garden_type not provided</td></tr><tr><td>garden_type should be in ['Backyard', 'Patio', 'Terrace'...] this array will replaced dynamically as per your design_type</td><td>garden_type not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`design_style`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>design_style field required</td><td>Design_style not provided</td></tr><tr><td>design_style should be in ['No Style', 'Eclectic', 'Modern'...] this array will replaced dynamically as per your design_type</td><td>Design_style not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`no_design`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>no_design field required</td><td>no_design not provided</td></tr><tr><td>no_design value is not a valid enumeration member; permitted: 1, 2, 3, 4</td><td>no_design not provided properly</td></tr></tbody></table>

<mark style="color:red;">**`prompt`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>prompt field required</td><td>prompt not provided</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

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

{
    "input_image": "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/input-20230901-085649876484.png",
    "output_images": [
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-1.png",
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-2.png",
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-3.png"
    ]
}
```

{% endtab %}
{% endtabs %}

## &#x20;[What is Masked Image?](https://api.homedesigns.ai/homedesignsai-api-documentation/others/what-is-masked-image)
