# Text to design

Text-to-design is a process where text-based input or descriptions are used to generate visual designs or concepts.This can be done using various tools or software that utilize artificial intelligence or other technologies to interpret the text and create corresponding visual representations.

## ENDPOINT&#x20;

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

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

{% hint style="info" %} <mark style="color:blue;">It is a convenient and efficient way to generate design ideas based on written descriptions quickly.</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="216">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>custom_instruction</code></strong></mark> </p><p> <mark style="color:green;"><code>string</code></mark></p></td><td>-</td><td>By providing custom instructions, users can communicate their unique vision and style preferences to the AI system. Text-to-design is a process where text-based input or descriptions are used to generate visual designs or concepts. <strong>(Required Parameter)</strong></td></tr></tbody></table>
{% endtab %}

{% tab title="Errors" %}

### Parameters & Errors

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

<table><thead><tr><th width="327">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>custom_instruction field required.</td><td>You need to enter your query. Blank fields are not accepted.</td></tr></tbody></table>

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

<table><thead><tr><th width="327">Error Messages</th><th>Reason</th></tr></thead><tbody><tr><td>The mode field is required.</td><td>The mode type field is required to get the result.</td></tr><tr><td>The mode type value is not a valid enumeration member. Permitted values are: [faster, lower].</td><td>mode type not provided properly</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

<pre class="language-json"><code class="lang-json"><strong>//Output should be in list of array depends on no of designs as shown below:
</strong>
{
    "output_images": [
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-1.png",
    ]
}
</code></pre>

{% endtab %}
{% endtabs %}
