# Tripo H3.1 Image to 3D

> Generate high-quality 3D models from a single image using Tripo H3.1.


## Overview

- **Endpoint**: `https://fal.run/tripo3d/h3.1/image-to-3d`
- **Model ID**: `tripo3d/h3.1/image-to-3d`
- **Category**: image-to-3d
- **Kind**: inference
**Tags**: 3d, image-to-3d, 3d-generation, tripo



## Pricing

Your request will cost $0.20 (without textures), $0.30 (with standard textures), or $0.40 (with HD textures), plus an additional $0.20 for detailed geometry and $0.05 for quad mesh if selected.

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:


- **`image_url`** (`string`, _required_):
  URL of the input image for 3D model creation.
  - Examples: "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png"

- **`face_limit`** (`integer`, _optional_):
  Target number of faces for the generated mesh. If not set, the model adaptively determines the count.
  - Range: `1000` to `2000000`

- **`texture`** (`boolean`, _optional_):
  Whether to generate textures for the model. Default value: `true`
  - Default: `true`

- **`pbr`** (`boolean`, _optional_):
  Whether to generate PBR (Physically Based Rendering) materials. If true, texture is also enabled. Default value: `true`
  - Default: `true`

- **`model_seed`** (`integer`, _optional_):
  Seed for geometry generation reproducibility.

- **`texture_seed`** (`integer`, _optional_):
  Seed for texture generation reproducibility.

- **`texture_quality`** (`TextureQualityEnum`, _optional_):
  Quality level for textures. 'detailed' produces higher-resolution textures. Default value: `"standard"`
  - Default: `"standard"`
  - Options: `"standard"`, `"detailed"`

- **`geometry_quality`** (`GeometryQualityEnum`, _optional_):
  Quality level for geometry. Default value: `"standard"`
  - Default: `"standard"`
  - Options: `"standard"`, `"detailed"`

- **`texture_alignment`** (`TextureAlignmentEnum`, _optional_):
  How textures are aligned. 'original_image' aligns to input image, 'geometry' aligns to generated geometry. Default value: `"original_image"`
  - Default: `"original_image"`
  - Options: `"original_image"`, `"geometry"`

- **`auto_size`** (`boolean`, _optional_):
  Auto-scale the model to real-world dimensions (meters).
  - Default: `false`

- **`orientation`** (`OrientationEnum`, _optional_):
  Model orientation. 'align_image' auto-rotates to match the input image. Default value: `"default"`
  - Default: `"default"`
  - Options: `"default"`, `"align_image"`

- **`quad`** (`boolean`, _optional_):
  Generate quad (4-sided) mesh topology instead of triangles.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "image_url": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.png",
  "texture": true,
  "pbr": true,
  "texture_quality": "standard",
  "geometry_quality": "standard",
  "texture_alignment": "original_image",
  "orientation": "default"
}
```


### Output Schema

The API returns the following output format:

- **`model_mesh`** (`File`, _required_):
  Generated 3D model file in GLB format.

- **`model_urls`** (`ModelUrls`, _required_):
  URLs for different 3D model variants.

- **`rendered_image`** (`File`, _optional_):
  Preview render of the generated 3D model.



**Example Response**:

```json
{
  "model_mesh": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  },
  "model_urls": {}
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/tripo3d/h3.1/image-to-3d \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.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(
    "tripo3d/h3.1/image-to-3d",
    arguments={
        "image_url": "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.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("tripo3d/h3.1/image-to-3d", {
  input: {
    image_url: "https://v3b.fal.media/files/b/zebra/3osHJDI8IZ2wl6sGtEUeB_image.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/tripo3d/h3.1/image-to-3d)
- [API Documentation](https://fal.ai/models/tripo3d/h3.1/image-to-3d/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=tripo3d/h3.1/image-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)
