> For the complete documentation index, see [llms.txt](https://api.homedesigns.ai/homedesignsai-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.homedesigns.ai/homedesignsai-api-documentation/core-apis/smart-room-composer.md).

# Smart Room Composer

Fill empty rooms with your own furniture. **Smart Room Composer** intelligently arranges everything for a seamless and balanced design.

## ENDPOINT

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

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

{% hint style="info" %} <mark style="color:blue;">Use the smart\_</mark><mark style="color:blue;">**room\_composer endpoint**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">to automatically arrange furniture and decor, creating a perfectly balanced and visually appealing room layout.</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>room_image</code></strong></mark>  </p><p>file[ .jpg, .jpeg, .png] / base64 Image <mark style="color:green;"><code>string</code></mark></p></td><td>Input allows images, via file or Base64.</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>furniture_images[]</code></strong></mark></p><p>file[ .jpg, .jpeg, .png] / base64 Image <mark style="color:green;"><code>string</code></mark></p></td><td>Input allows a minimum of 1 and a maximum of 4 images, via file or Base64.</td><td>Choose furniture images such as a sofa, table, or chair. Add up to 4 items to create your design. The image dimensions must be 512x512 pixels or greater for optimal results.  <strong>(Required Parameter)</strong></td></tr><tr><td><mark style="color:red;"><strong><code>additional_instructions</code></strong></mark></td><td></td><td>Providing instructions is optional.<br>You can guide furniture placement within the room.<br>This improves the final design output.</td></tr></tbody></table>
{% endtab %}

{% tab title="Errors" %}

### Parameters & Errors

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

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Room 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;">**`furniture_images[]`**</mark>

<table><thead><tr><th width="289">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>Furniture image field required</td><td>Furniture 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>Furniture 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;">**`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</td><td>Invalid queue ID.</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

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

{
    "success": {
        "original_image": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/input-7b7e9196-79d3-41cf-adad-00964eb17632-2026-04-27-10-53-20.png",
        "generated_image": [
            "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/output-7b7e9196-79d3-41cf-adad-00964eb17632-2026-04-27-10-53-20-1.png"
        ]
    }
}
```

{% endtab %}
{% endtabs %}

#### Process for Using <mark style="color:blue;">`/smart_room_composer`</mark> and <mark style="color:blue;">`/smart_room_composer/status_check`</mark> Endpoints

<mark style="background-color:green;">**`GET`**</mark>  [https://homedesigns.ai/api/v2/smart\_room\_composer/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&#x20;**<mark style="color:$info;">**`/smart_room_composer`**</mark>
   * When you send a request to the <mark style="color:$info;">**`/smart_room_composer`**</mark>endpoint with all required parameters, it will generate a `queue_id`.
   * Example response from <mark style="color:$info;">**`/smart_room_composer`**</mark>:

     ```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.

***

2. **Step 2: Use `queue_id` in&#x20;**<mark style="color:$info;">**`/smart_room_composer/status_check`**</mark>**Endpoint**
   * Append the generated `queue_id` to the <mark style="color:$info;">**`/smart_room_composer/status_check`**</mark>endpoint to check the processing status.
   * Example request:

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

***

3. **Step 3: Review the Status Response**
   * The <mark style="color:$info;">**`/smart_room_composer/status_check`**</mark> 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": "2026-03-31T09:54:38.303Z",
         "started_at": "2026-03-31T09:54:38.322847005Z",
         "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:

     {
         "success": {
             "original_image": "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/input-7b7e9196-79d3-41cf-adad-00964eb17632-2026-04-27-10-53-20.png",
             "generated_image": [
                 "https://storage.googleapis.com/generativeartbucket/UserGenerations/cristian/output-7b7e9196-79d3-41cf-adad-00964eb17632-2026-04-27-10-53-20-1.png"
             ]
         }
     }
     ```

***

4. **Step 4: Get the Final Result**
   * Continue checking the status by re sending the request to the <mark style="color:$info;">**`/smart_room_composer/status_check`**</mark> endpoint until the status changes to `"SUCCESS"`.
   * When the status is `"SUCCESS"`, you will receive the final result in the response.<br>

\ <br>
