# Beautiful Redesign

Want to make your home look stunning inside and out? Our Beautiful Redesign API can do just that. It helps you change up your place in different styles, making it look amazing.

The beautiful\_redesign endpoint applies a set of predefined design rules to enhance the aesthetics of a given space. It aims to make the space more visually appealing by optimizing various design elements.

## ENDPOINT

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

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

{% hint style="info" %} <mark style="color:blue;">Use this endpoint to apply a pre-defined set of design rules to beautify a given space.</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="194">Parameters &#x26; Data Type</th><th width="170">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></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>ai_intervention</code></strong></mark></p><p><mark style="color:green;"><code>string</code></mark></p></td><td>Very Low, Low, Mid, Extreme</td><td>Indicates the level of AI intervention in the design process. "Very Low" means minimal changes, while "Extreme" allows for significant alterations to the original design. <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>Defines the overall aesthetic style you want to achieve, such as 'Bohemian', 'Industrial', 'Scandinavian', etc.  <strong>(Required Parameter)</strong></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><p><mark style="color:red;"><strong><code>house_angle</code></strong></mark>  </p><p><mark style="color:green;"><code>string</code></mark> </p></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><p><mark style="color:red;"><strong><code>garden_type</code></strong></mark>   </p><p><mark style="color:green;"><code>string</code></mark></p></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><tr><td>  <mark style="color:red;"><code>keep_structural_element</code></mark>  <mark style="color:green;"><code>boolean</code></mark></td><td>Should be Either True or False</td><td>Not required. It will take the value as true by default.</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;">**`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;">**`ai_intervention`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>ai_intervention field required</td><td>ai_intervention not provided</td></tr><tr><td>ai_intervention value is not a valid enumeration member; permitted: 'Very Low', 'Low', 'Mid', 'Extreme'</td><td>ai_intervention 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>
{% 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 %}
