# Sketch to Render

The sketch\_to\_render endpoint transforms rough sketches or drawings of house interiors or exteriors into detailed, hyper-realistic renders. This tool is indispensable for architects, designers, and homebuilders, facilitating a clearer vision of upcoming projects and proposals. By providing a detailed visualization from simple sketches, this endpoint helps bridge the gap between concept and reality, enhancing client presentations and design accuracy.

## ENDPOINT

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

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

{% hint style="info" %} <mark style="color:blue;">Convert Sketches into photorealistic render using sketch\_to\_render endpoint, ideal for architects and home builders.</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></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><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><a href="/pages/hlpt4St15vcflR1t0g6p">Exterior Design Styles </a><br><a href="/pages/tcu0MAfYZU86XuQ2WNk1">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="/pages/1IXJoKeg6ULX6nvsTHfi">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="/pages/cN6kJ8nYAAKpEHpDbbU1">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="/pages/DxYYfPi6zoGtknbbOa1F">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;">**`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 width="324">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 %}


---

# 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/sketch-to-render.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.
