# Hunyuan3d V3

> Turn simple sketches into detailed, fully-textured 3D models. Instantly convert your concept designs into formats ready for Unity, Unreal, and Blender.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/hunyuan3d-v3/text-to-3d`
- **Model ID**: `fal-ai/hunyuan3d-v3/text-to-3d`
- **Category**: text-to-3d
- **Kind**: inference


## Pricing

Your request will cost **$0.375** per generation. For **$1.00**, you can run this model **2** times.
Generation types: Normal costs **$0.375**, LowPoly costs **$0.45**, Geometry costs **$0.225**.
Enabling PBR materials adds **$0.15**. Using multi-view images (back/left/right) adds **$0.15**. Custom face count adds **$0.15**.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  Text description of the 3D content to generate. Supports up to 1024 UTF-8 characters.
  - Examples: "A rustic wooden treasure chest with metal bands and ornate lock"

- **`enable_pbr`** (`boolean`, _optional_):
  Whether to enable PBR material generation
  - Default: `false`

- **`face_count`** (`integer`, _optional_):
  Target face count. Range: 40000-1500000 Default value: `500000`
  - Default: `500000`
  - Range: `40000` to `1500000`

- **`generate_type`** (`GenerateTypeEnum`, _optional_):
  Generation type. Normal: textured model. LowPoly: polygon reduction. Geometry: white model without texture. Default value: `"Normal"`
  - Default: `"Normal"`
  - Options: `"Normal"`, `"LowPoly"`, `"Geometry"`

- **`polygon_type`** (`PolygonTypeEnum`, _optional_):
  Polygon type. Only takes effect when GenerateType is LowPoly. Default value: `"triangle"`
  - Default: `"triangle"`
  - Options: `"triangle"`, `"quadrilateral"`



**Required Parameters Example**:

```json
{
  "prompt": "A rustic wooden treasure chest with metal bands and ornate lock"
}
```

**Full Example**:

```json
{
  "prompt": "A rustic wooden treasure chest with metal bands and ornate lock",
  "face_count": 500000,
  "generate_type": "Normal",
  "polygon_type": "triangle"
}
```


### Output Schema

The API returns the following output format:

- **`model_glb`** (`File`, _required_):
  Generated 3D object in GLB format.
  - Examples: {"file_size":64724836,"url":"https://v3b.fal.media/files/b/0a8686a8/1hPquv3AqqkfnqSM9fpmB_model.glb","file_name":"model.glb","content_type":"model/gltf-binary"}

- **`thumbnail`** (`File`, _optional_):
  Preview thumbnail of the generated model
  - Examples: {"file_size":172757,"url":"https://v3b.fal.media/files/b/0a8686a8/khgYO1d6xqWOJPi6_IR_j_preview.png","file_name":"preview.png","content_type":"image/png"}

- **`model_urls`** (`ModelUrls`, _required_):
  URLs for different 3D model formats
  - Examples: {"glb":{"file_size":64724836,"url":"https://v3b.fal.media/files/b/0a8686a8/1hPquv3AqqkfnqSM9fpmB_model.glb","file_name":"model.glb","content_type":"model/gltf-binary"},"obj":{"file_size":44084728,"url":"https://v3b.fal.media/files/b/0a8686a8/AVgdsVFrGAKGAFr4e2g56_model.obj","file_name":"model.obj","content_type":"text/plain"}}

- **`seed`** (`integer`, _optional_):
  The seed used for generation



**Example Response**:

```json
{
  "model_glb": {
    "file_size": 64724836,
    "url": "https://v3b.fal.media/files/b/0a8686a8/1hPquv3AqqkfnqSM9fpmB_model.glb",
    "file_name": "model.glb",
    "content_type": "model/gltf-binary"
  },
  "thumbnail": {
    "file_size": 172757,
    "url": "https://v3b.fal.media/files/b/0a8686a8/khgYO1d6xqWOJPi6_IR_j_preview.png",
    "file_name": "preview.png",
    "content_type": "image/png"
  },
  "model_urls": {
    "glb": {
      "file_size": 64724836,
      "url": "https://v3b.fal.media/files/b/0a8686a8/1hPquv3AqqkfnqSM9fpmB_model.glb",
      "file_name": "model.glb",
      "content_type": "model/gltf-binary"
    },
    "obj": {
      "file_size": 44084728,
      "url": "https://v3b.fal.media/files/b/0a8686a8/AVgdsVFrGAKGAFr4e2g56_model.obj",
      "file_name": "model.obj",
      "content_type": "text/plain"
    }
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/hunyuan3d-v3/text-to-3d \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A rustic wooden treasure chest with metal bands and ornate lock"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/hunyuan3d-v3/text-to-3d",
    arguments={
        "prompt": "A rustic wooden treasure chest with metal bands and ornate lock"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/hunyuan3d-v3/text-to-3d", {
  input: {
    prompt: "A rustic wooden treasure chest with metal bands and ornate lock"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/hunyuan3d-v3/text-to-3d)
- [API Documentation](https://fal.ai/models/fal-ai/hunyuan3d-v3/text-to-3d/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/hunyuan3d-v3/text-to-3d)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
