# Tripo P1 Image to 3D

> Generate 3D models from a single image using Tripo P1.


## Overview

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



## Pricing

Your request will cost $0.40 (without textures) or $0.50 (with textures).

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: `48` to `20000`

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

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



**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
}
```


### 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/p1/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/p1/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/p1/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/p1/image-to-3d)
- [API Documentation](https://fal.ai/models/tripo3d/p1/image-to-3d/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=tripo3d/p1/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)
