# Hunyuan3D

> Generate 3D models from your images using Hunyuan 3D. A native 3D generative model enabling versatile and high-quality 3D asset creation.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/hunyuan3d/v2/turbo`
- **Model ID**: `fal-ai/hunyuan3d/v2/turbo`
- **Category**: image-to-3d
- **Kind**: inference
**Tags**: stylized



## Pricing

- **Price**: $0.14 per generations

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:


- **`input_image_url`** (`string`, _required_):
  URL of image to use while generating the 3D model.
  - Examples: "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png"

- **`seed`** (`integer`, _optional_):
  The same seed and the same prompt given to the same version of the model
  will output the same image every time.

- **`num_inference_steps`** (`integer`, _optional_):
  Number of inference steps to perform. Default value: `50`
  - Default: `50`
  - Range: `1` to `50`

- **`guidance_scale`** (`float`, _optional_):
  Guidance scale for the model. Default value: `7.5`
  - Default: `7.5`
  - Range: `0` to `20`

- **`octree_resolution`** (`integer`, _optional_):
  Octree resolution for the model. Default value: `256`
  - Default: `256`
  - Range: `1` to `1024`

- **`textured_mesh`** (`boolean`, _optional_):
  If set true, textured mesh will be generated and the price charged would be 3 times that of white mesh.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "input_image_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png"
}
```

**Full Example**:

```json
{
  "input_image_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png",
  "num_inference_steps": 50,
  "guidance_scale": 7.5,
  "octree_resolution": 256
}
```


### Output Schema

The API returns the following output format:

- **`model_mesh`** (`File`, _required_):
  Generated 3D object file.
  - Examples: {"file_size":720696,"file_name":"white_mesh.glb","content_type":"application/octet-stream","url":"https://v3.fal.media/files/lion/WqIhtKPaSoeBtC30qzIGG_white_mesh.glb"}

- **`seed`** (`integer`, _required_):
  Seed value used for generation.



**Example Response**:

```json
{
  "model_mesh": {
    "file_size": 720696,
    "file_name": "white_mesh.glb",
    "content_type": "application/octet-stream",
    "url": "https://v3.fal.media/files/lion/WqIhtKPaSoeBtC30qzIGG_white_mesh.glb"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/hunyuan3d/v2/turbo \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "input_image_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png"
   }'
```

### 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/v2/turbo",
    arguments={
        "input_image_url": "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png"
    },
    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/v2/turbo", {
  input: {
    input_image_url: "https://storage.googleapis.com/falserverless/model_tests/video_models/robot.png"
  },
  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/v2/turbo)
- [API Documentation](https://fal.ai/models/fal-ai/hunyuan3d/v2/turbo/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/hunyuan3d/v2/turbo)

### 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)
