# Perfect Redesign

Transform your home spaces with stunning furniture and interiors tailored to your needs. This feature enhances your living environment while preserving essential structural elements. Achieve a harmonious blend of style and functionality. A seamless solution for a beautifully redesigned home!

## ENDPOINT

<mark style="color:green;">**`POST`**</mark>  <mark style="color:purple;">**`/perfect_redesign`**</mark>  &#x20;

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

{% hint style="info" %} <mark style="color:blue;">Use this endpoint to redesign of your home spaces with enhanced results.</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="301">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></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. <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 - 2</td><td>Specifies the number of design variations you want the API to generate. The minimum is 1 and the maximum is 2. <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="/pages/hlpt4St15vcflR1t0g6p">Interior Design Styles</a></p><p><br></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="/pages/1IXJoKeg6ULX6nvsTHfi">Click here</a> to see more room types.</td></tr><tr><td><p><mark style="color:red;"><strong><code>custom_instruction</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><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="/pages/cN6kJ8nYAAKpEHpDbbU1">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 equired 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="/pages/DxYYfPi6zoGtknbbOa1F">Click here</a> to see more garden types.</td></tr><tr><td><br><mark style="color:red;"><strong><code>keep_structural_element</code></strong></mark>   <br><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.'</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;">**`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.</td><td>no_design 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;">**`status_check`**</mark>&#x20;

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Please Enter a Valid Queue ID <br></td><td>Invalid queue ID or (queue_id is valid for the 30 minutes if you try after then showing error)</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 %}

#### Process for Using `/perfect_redesign` and `/status_check` Endpoints

<mark style="background-color:green;">**`GET`**</mark>  [https://homedesigns.ai/api/v2/perfect\_redesign/status\_check/](https://homedesigns.ai/api/v2/virtual_staging/status_check/0dc62f7f-85f1-4d50-94e2-b5040375d96f-u1)<mark style="color:blue;">ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1</mark>

1. **Step 1: Pass Required Parameters to `/perfect_redesign`**
   * When you send a request to the `/perfect_redesign`endpoint with all required parameters, it will generate a `queue_id`.
   * Example response from `/perfect_redesign`:

     ```json
     {
         "id": "ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1",
         "status": "IN_QUEUE"
     }
     ```
   * The `queue_id` (`id` value) from this response will be used in subsequent requests.\
     \&#xNAN;**`queue_id` is valid for the 30 minutes if you try after then showing error {**&#x50;lease Enter a Valid Queue ID}\
     \
     ![](/files/FiXUvRg5spJWsxGbLamD)

***

2. **Step 2: Use `queue_id` in `/perfect_redesign/status_check`Endpoint**
   * Append the generated `queue_id` to the `/perfect_redesign/status` endpoint to check the processing status.
   * Example request:

     ```bash
     GET /perfect_redesign/status_check/ag61df25b20-e263-4bae-vbgbae8-ecccaafgbbd687-ugf1
     ```

***

3. **Step 3: Review the Status Response**
   * The `/perfect_redesign/status_check` endpoint will return the current status of the process. Initially, the status might indicate that the process is still in  **`"starting"`**  wait a few moments and send the request again.
   * Example response:

     ```json
     {
         "created_at": "2025-05-26T12:39:19.094Z",
         "status": "starting"
     }

     ```
   * If the status is still pending  **`"Processing"`** wait a few moments and send the request again.
   * Example response:
   * ```
     {
         "created_at": "2025-05-26T12:37:35.003Z",
         "started_at": "2025-05-26T12:37:35.011161515Z",
         "status": "processing"
     }
      
     ```
   * Once all the statuses marked as `IN_QUEUE` , `starting` and `processing` are completed, after hitting the requests one by one, you will see the results as follows:

     ```
     //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"
         ]
     }
     ```

***

4. **Step 4: Get the Final Result**
   * Continue checking the status by resending the request to the `/`perfect\_redesign/status\_check endpoint until the status changes to `"SUCCESS"`.
   * When the status is `"SUCCESS"`, you will receive the final result in the response.

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.homedesigns.ai/homedesignsai-api-documentation/core-apis/perfect-redesign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
