# Meshy 5 Remesh

> Meshy-5 remesh allows you to remesh and export existing 3D models into various formats


## Overview

- **Endpoint**: `https://fal.run/fal-ai/meshy/v5/remesh`
- **Model ID**: `fal-ai/meshy/v5/remesh`
- **Category**: 3d-to-3d
- **Kind**: inference
**Tags**: 3d-to-3d



## Pricing

- **Price**: $0.2 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:


- **`model_url`** (`string`, _required_):
  URL or base64 data URI of a 3D model to remesh. Supports .glb, .gltf, .obj, .fbx, .stl formats. Can be a publicly accessible URL or data URI with MIME type application/octet-stream.
  - Examples: "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.glb"

- **`target_formats`** (`list<Enum>`, _optional_):
  List of target formats for the remeshed model.
  - Default: `["glb"]`
  - Array of Enum
  - Examples: ["glb","fbx"]

- **`topology`** (`TopologyEnum`, _optional_):
  Specify the topology of the generated model. Quad for smooth surfaces, Triangle for detailed geometry. Default value: `"triangle"`
  - Default: `"triangle"`
  - Options: `"quad"`, `"triangle"`
  - Examples: "triangle"

- **`target_polycount`** (`integer`, _optional_):
  Target number of polygons in the generated model. Actual count may vary based on geometry complexity. Default value: `30000`
  - Default: `30000`
  - Range: `100` to `300000`
  - Examples: 137220

- **`resize_height`** (`float`, _optional_):
  Resize the model to a certain height measured in meters. Set to 0 for no resizing.
  - Default: `0`

- **`origin_at`** (`Enum`, _optional_):
  Position of the origin. None means no effect.
  - Options: `"bottom"`, `"center"`



**Required Parameters Example**:

```json
{
  "model_url": "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.glb"
}
```

**Full Example**:

```json
{
  "model_url": "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.glb",
  "target_formats": [
    "glb",
    "fbx"
  ],
  "topology": "triangle",
  "target_polycount": 137220
}
```


### Output Schema

The API returns the following output format:

- **`model_glb`** (`File`, _optional_):
  Remeshed 3D object in GLB format (if GLB was requested).
  - Examples: {"file_name":"model.glb","content_type":"model/gltf-binary","file_size":3294196,"url":"https://v3b.fal.media/files/b/panda/hu-dDvUIPdoHSxR7QcBZw_model.glb"}

- **`model_urls`** (`ModelUrls`, _required_):
  URLs for different 3D model formats
  - Examples: {"glb":{"file_name":"model.glb","content_type":"model/gltf-binary","file_size":3294196,"url":"https://v3b.fal.media/files/b/panda/hu-dDvUIPdoHSxR7QcBZw_model.glb"},"fbx":{"file_name":"model.fbx","content_type":"application/octet-stream","file_size":3476092,"url":"https://v3b.fal.media/files/b/kangaroo/Kw7C1w2Uccg3zKQ5axnwk_model.fbx"}}



**Example Response**:

```json
{
  "model_glb": {
    "file_name": "model.glb",
    "content_type": "model/gltf-binary",
    "file_size": 3294196,
    "url": "https://v3b.fal.media/files/b/panda/hu-dDvUIPdoHSxR7QcBZw_model.glb"
  },
  "model_urls": {
    "glb": {
      "file_name": "model.glb",
      "content_type": "model/gltf-binary",
      "file_size": 3294196,
      "url": "https://v3b.fal.media/files/b/panda/hu-dDvUIPdoHSxR7QcBZw_model.glb"
    },
    "fbx": {
      "file_name": "model.fbx",
      "content_type": "application/octet-stream",
      "file_size": 3476092,
      "url": "https://v3b.fal.media/files/b/kangaroo/Kw7C1w2Uccg3zKQ5axnwk_model.fbx"
    }
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/meshy/v5/remesh \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "model_url": "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.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(
    "fal-ai/meshy/v5/remesh",
    arguments={
        "model_url": "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.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("fal-ai/meshy/v5/remesh", {
  input: {
    model_url: "https://v3b.fal.media/files/b/tiger/62QMEQqZ3pjUds4DfuVtX_model.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/fal-ai/meshy/v5/remesh)
- [API Documentation](https://fal.ai/models/fal-ai/meshy/v5/remesh/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/meshy/v5/remesh)

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