# Tripo3D Segment

> Automatically splits a 3D model into semantic parts for editing, texturing, and rigging.


## Overview

- **Endpoint**: `https://fal.run/tripo3d/tripo/segment`
- **Model ID**: `tripo3d/tripo/segment`
- **Category**: 3d-to-3d
- **Kind**: inference
**Tags**: stylized, transform



## Pricing

- **Price**: $0.01 per units

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:


- **`mesh_url`** (`string`, _required_):
  URL of the input 3D model to segment. Supported formats: GLB, OBJ, FBX, STL (max 150MB).
  - Examples: "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"



**Required Parameters Example**:

```json
{
  "mesh_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
}
```


### Output Schema

The API returns the following output format:

- **`model_mesh`** (`File`, _required_):
  Segmented 3D model file. May be GLB or FBX depending on Tripo output.

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

- **`part_names`** (`list<string>`, _optional_):
  Names of the segmented parts, when reported by Tripo. Pass these to the remesh endpoint's 'part_names' to preserve parts.
  - Array of string

- **`rendered_image`** (`File`, _optional_):
  Preview render of the segmented 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/tripo/segment \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "mesh_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
   }'
```

### 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/tripo/segment",
    arguments={
        "mesh_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
    },
    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/tripo/segment", {
  input: {
    mesh_url: "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb"
  },
  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/tripo/segment)
- [API Documentation](https://fal.ai/models/tripo3d/tripo/segment/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=tripo3d/tripo/segment)

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