# Hi3D Image to 3D

> Generate 3D models from a single image with Hi3D.


## Overview

- **Endpoint**: `https://fal.run/hitem3d/hi3d/image-to-3d`
- **Model ID**: `hitem3d/hi3d/image-to-3d`
- **Category**: image-to-3d
- **Kind**: inference
**Tags**: image-to-3d, 3d, mesh



## Pricing

Your request is billed at $0.02 per credit. Total cost is a sum of geometry, texture, and PBR credits, where geometry credits scale with resolution, texture is fixed at 10 credits, and PBR (v2.0 and above) is fixed at 5 credits. On v1.5, your request will cost $0.30 (512), $0.40 (1024), $0.60 (1536), or $0.80 (1536pro). On v2.0, it will cost $0.70 (1536) or $0.90 (1536pro). On v2.1, it will cost $0.50 (1536_fast) or $0.90 (1536pro). Portrait generations cost $0.60 (1536) on v1.5, $0.90 (1536pro) on v2.0, and $0.50 (1536pro_fast) or $0.90 (1536pro) on v2.1.

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:


- **`model`** (`ModelEnum`, _optional_):
  Model version used for generation. 'hitem3d*' are the general models; 'scene-portrait*' are tuned for portraits/characters. Default value: `"hitem3dv2.1"`
  - Default: `"hitem3dv2.1"`
  - Options: `"hitem3dv1.5"`, `"hitem3dv2.0"`, `"hitem3dv2.1"`, `"scene-portraitv1.5"`, `"scene-portraitv2.0"`, `"scene-portraitv2.1"`

- **`resolution`** (`Enum`, _optional_):
  Generation resolution. Supported values depend on the model: v1.5/v2.0 accept 512, 1024, 1536 and 1536pro; v2.1 accepts 1536fast and 1536pro; scene-portraitv1.5 accepts 1536; scene-portraitv2.0 accepts 1536pro; scene-portraitv2.1 accepts 1536profast and 1536pro. Defaults to the model's recommended resolution (1024 for v1.5/v2.0, the fast tier otherwise).
  - Options: `"512"`, `"1024"`, `"1536"`, `"1536pro"`, `"1536fast"`, `"1536profast"`

- **`enable_texture`** (`boolean`, _optional_):
  Whether to generate textures in addition to geometry. When false, only the geometry mesh is generated (and billed). Default value: `true`
  - Default: `true`

- **`enable_pbr`** (`boolean`, _optional_):
  Generate PBR material maps together with the texture. Only supported (and billed) for v2.0/v2.1 models when enable_texture is true; ignored otherwise. Default value: `true`
  - Default: `true`

- **`face_count`** (`integer`, _optional_):
  Target face count of the generated model. When unset, the partner picks the recommended count for the resolution (e.g. 500k for 512, 1M for 1024, 2M for 1536).
  - Range: `100000` to `2000000`

- **`export_format`** (`ExportFormatEnum`, _optional_):
  File format of the generated model. Default value: `"glb"`
  - Default: `"glb"`
  - Options: `"glb"`, `"obj"`, `"stl"`, `"fbx"`, `"usdz"`

- **`enable_safety_checker`** (`boolean`, _optional_):
  If set to true, input images are checked for safety before processing. Default value: `true`
  - Default: `true`

- **`image_url`** (`string`, _required_):
  URL of the input image. PNG, JPEG and WebP formats are supported, up to 20MB.
  - Examples: "https://storage.googleapis.com/falserverless/example_inputs/dog.png"



**Required Parameters Example**:

```json
{
  "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
}
```

**Full Example**:

```json
{
  "model": "hitem3dv2.1",
  "enable_texture": true,
  "enable_pbr": true,
  "export_format": "glb",
  "enable_safety_checker": true,
  "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
}
```


### Output Schema

The API returns the following output format:

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

- **`thumbnail`** (`File`, _optional_):
  Preview image of the generated model, when available.



**Example Response**:

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


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/hitem3d/hi3d/image-to-3d \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.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(
    "hitem3d/hi3d/image-to-3d",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/example_inputs/dog.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("hitem3d/hi3d/image-to-3d", {
  input: {
    image_url: "https://storage.googleapis.com/falserverless/example_inputs/dog.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/hitem3d/hi3d/image-to-3d)
- [API Documentation](https://fal.ai/models/hitem3d/hi3d/image-to-3d/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=hitem3d/hi3d/image-to-3d)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
