> For the complete documentation index, see [llms.txt](https://dressx.gitbook.io/dressx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dressx.gitbook.io/dressx-docs/additional-api-endpoints/text-to-image-dressing.md).

# Text to Image Dressing

The Text to Image Dressing API is a feature that allows you to integrate DRESSX's Text to Image capabilities into your own application. In this section, you'll find all the information you need to get started with this API.

***

<img src="https://1799512836-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv2HSpUlF4Thrgx47YYeI%2Fuploads%2FKZKEZ4AcpAOghId1s7KK%2FButtons-4.png?alt=media&amp;token=ceb3355d-99c4-47fc-ac8a-510548dc30f9" alt="" data-size="line">  /v2/external/dressxme/genai/

***

### Create a Text to Image Task <a href="#create-a-text-to-texture-task" id="create-a-text-to-texture-task"></a>

This endpoint allows you to create a new task for texture generation using the Text to Image feature. Once the task is created, you will need to wait for the response via the provided webhook. Refer to the Text to Image Task Object to see which properties are included with the task object.

**Required**&#x20;

```
image : String
```

URL of the input image with the person to be processed. Acceptable formats: `jpg`, `png`, `heic`

***

```
prompt : String
```

Text prompt describing the desired transformation or generation based on the image (describe the outfit you want to generate)

***

```
callback_url : String
```

URL to which the model should send the response after processing is complete

***

```
callback_auth : String
```

Authentication key/token for secure communication with the callback URL

***

```
order_id : Int
```

Unique identifier for the order or processing request, used for tracking

***

```
order_id : Int
```

Unique identifier for the order or processing request, used for tracking

***

### Optional

```
inspiration : String
```

If you want to not just use a text prompt but add realism by providing a photo of the clothing, then you need to pass a URL to that clothing image here. Acceptable formats: `jpg`, `png`

### Auth

To authenticate your request, include your API key in the `Authorization` header

```
Authorization: YOUR_API_KEY
```

{% hint style="info" %}
Replace `YOUR_API_KEY` with your actual key provided by the DRESSX platform. This header must be included in all requests to access protected endpoints.

If the key is missing or invalid, the server will respond with a `401 Unauthorized` error
{% endhint %}

### Response

After a successful request, the following response will be returned.

### Json Example

```json
{
    "status": "processing"   
}
```

### Webhook Response Json Example

```json
{
    "order_id": 12345,  
    "status": "success", 
    "dressed_image": "https://api.dressx.com/v1/files/files/08/example.jpg" 
}
```

### **Status** **options**

Status of the task. Possible values are one of  `SUCCEEDED`, `FAILED`, `CANCELED`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dressx.gitbook.io/dressx-docs/additional-api-endpoints/text-to-image-dressing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
