# Text to 3D

The **Text to 3D API** is a feature that allows you to integrate **DRESSX**'s text-to-3D generation capabilities into your own application. This section provides 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&#x26;token=ceb3355d-99c4-47fc-ac8a-510548dc30f9" alt="" data-size="line">  /v2/pipeline/text-to-3d/

***

### Create a Text to 3D Preview Task <a href="#create-a-text-to-3d-preview-task" id="create-a-text-to-3d-preview-task"></a>

This endpoint allows you to create a new **Text to 3D Preview** task using **DRESSX** AI tools. It initiates the generation of a base 3D mesh without textures

\
Refer to the **Text to 3D Task Object** to see which properties are included in the task object.

### Parameters

**Required**

```
model_type : String
```

Downloadable URL to the textured 3D model file generated by **DRESSX**. The property for a format will be omitted if the format is not generated, instead of returning an empty string.

* model\_type: `glb`\
  Type: string\
  Description: Downloadable URL to the GLB file.
* model\_type: `fbx`\
  Type: string\
  Description: Downloadable URL to the FBX file.
* model\_type: `obj`\
  Type: string\
  Description: Downloadable URL to the OBJ file.
* model\_type: `usdz`\
  Type: string\
  Description: Downloadable URL to the USDZ file.

***

```
result_url : String
```

A URL endpoint where the system will send the results of the Mesh generation task once it is completed. This is typically a webhook that your application listens to for updates.

***

```
key : String
```

A unique authentication key used to authorize the request. It ensures that only valid, authenticated users can submit texture generation tasks and receive results.

***

```
prompt : String
```

Provide a concise description of the 3D object you want to generate. Specify the item type (e.g., jacket, boots, dress) and include key details such as shape, style, or materials. Maximum length is 500 characters.

***

```
seed : Int
```

The seed value determines the randomness of the generation. Using the same prompt and seed will typically produce identical results. However, due to ongoing updates to **DRESSX** systems, results may occasionally vary even with the same seed.

***

<pre><code><strong>model_v : 1 or 2 (Int)
</strong></code></pre>

ID of the model to use.

***

```
topology : String
```

Accepted values:

* **quad** – Generates a quad-dominant mesh, suitable for further editing and animation.
* **triangle** – Generates a simplified triangle mesh, optimized for lightweight use.

If not specified, the default is **triangle**.

```
target_polycount : Int
```

Set the desired number of polygons for the generated 3D model. The final count may differ slightly based on the model's complexity.

Valid range: **100 to 300,000** (inclusive), depending on your user tier.\
If not specified, the default value is **30,000**.

```
order : Int
```

The unique identifier for the order. This ID helps track the specific task being processed within the system. It is crucial for associating the result with the correct order.

### Request Json Example

```json
{
  "prompt": "A futuristic dress",  
  "seed": 874392,  
  "result_url": "https://your-domain.com/orders/update/", 
  "key": "your-coordinator-key", 
  "model_v": 2,  
  "topology": "quad",  
  "target_polycount": 45000,  
  "order": 123456
}
```

### Webhook Response Json Example

```json
{
    "order_id": 123456,  
    "status": "success",  // Status of the task (success or failure)
    "mesh_url": "https://api.dressx.com/v1/files/files/mesh/08/example-mesh.obj", 
    "balance": 10  
}
```

`status`

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