# Meshy 6 Lite Retexture

> Meshy 6 Lite retexture applies new textures to an existing 3D model from a text prompt or a reference image, with optional PBR maps.


## Overview

- **Endpoint**: `https://fal.run/meshy/v6-lite/retexture`
- **Model ID**: `meshy/v6-lite/retexture`
- **Category**: 3d-to-3d
- **Kind**: inference
**Description**: Upload a 3D model (.glb, .gltf, .obj, .fbx or .stl, as a URL or base64 data URI) and describe the texture you want in up to 600 characters, or provide a reference image (.jpg, .jpeg or .png). If both are provided, the image is used. The original UV mapping is kept by default; turn it off to generate new UVs. Optionally generate PBR maps (metallic, roughness, normal) in addition to base color. Returns a GLB model, other available formats, texture files and a preview thumbnail. Safety checking is enabled by default.

**Tags**: 3d, 3d-to-3d, textures, pbr



## Pricing

Your request will cost **$0.30** per retextured model. PBR maps are included at no extra cost.

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 texture. 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/penguin/DId89qXLu6BXu09RFAwAV_model.glb"

- **`text_style_prompt`** (`string`, _optional_):
  Describe your desired texture style using text. Maximum 600 characters. Required if image_style_url is not provided.
  - Examples: "red and black chest"

- **`image_style_url`** (`string`, _optional_):
  2D image to guide the texturing process. Supports .jpg, .jpeg, and .png formats. Required if text_style_prompt is not provided. If both are provided, image_style_url takes precedence.

- **`enable_original_uv`** (`boolean`, _optional_):
  Use the original UV mapping of the model instead of generating new UVs. If the model has no original UV, output quality may be reduced. Default value: `true`
  - Default: `true`

- **`enable_pbr`** (`boolean`, _optional_):
  Generate PBR Maps (metallic, roughness, normal) in addition to base color.
  - Default: `false`

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



**Required Parameters Example**:

```json
{
  "model_url": "https://v3b.fal.media/files/b/penguin/DId89qXLu6BXu09RFAwAV_model.glb"
}
```

**Full Example**:

```json
{
  "model_url": "https://v3b.fal.media/files/b/penguin/DId89qXLu6BXu09RFAwAV_model.glb",
  "text_style_prompt": "red and black chest",
  "enable_original_uv": true,
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`model_glb`** (`File`, _required_):
  Retextured 3D object in GLB format.
  - Examples: {"content_type":"model/gltf-binary","file_name":"model.glb","url":"https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb","file_size":4097640}

- **`thumbnail`** (`File`, _optional_):
  Preview thumbnail of the retextured model
  - Examples: {"content_type":"image/png","file_name":"preview.png","url":"https://v3b.fal.media/files/b/lion/jFrzgIJMbaPQi_4HCEa8u_preview.png","file_size":124859}

- **`model_urls`** (`ModelUrls`, _required_):
  URLs for different 3D model formats
  - Examples: {"glb":{"content_type":"model/gltf-binary","file_name":"model.glb","url":"https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb","file_size":4097640},"fbx":{"content_type":"application/octet-stream","file_name":"model.fbx","url":"https://v3b.fal.media/files/b/rabbit/agzKf8N8zeVnteg72NiF4_model.fbx","file_size":4713692},"obj":{"content_type":"text/plain","file_name":"model.obj","url":"https://v3b.fal.media/files/b/zebra/M5aK_b6vKH7KeGCZoSLq7_model.obj","file_size":2964508},"usdz":{"content_type":"model/vnd.usdz+zip","file_name":"model.usdz","url":"https://v3b.fal.media/files/b/panda/4ItUhLHiH4foEw30qcWZv_model.usdz","file_size":3886518}}

- **`texture_urls`** (`list<TextureFiles>`, _optional_):
  Array of texture file objects
  - Array of TextureFiles
  - Examples: [{"base_color":{"content_type":"image/png","file_name":"texture_0.png","url":"https://v3b.fal.media/files/b/zebra/opBcVy7AK-GOlCTUz-_GZ_texture_0.png","file_size":3455709}}]

- **`text_style_prompt`** (`string`, _optional_):
  The text prompt used for texturing (if provided)
  - Examples: "red and black chest"

- **`image_style_url`** (`string`, _optional_):
  The image URL used for texturing (if provided)



**Example Response**:

```json
{
  "model_glb": {
    "content_type": "model/gltf-binary",
    "file_name": "model.glb",
    "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb",
    "file_size": 4097640
  },
  "thumbnail": {
    "content_type": "image/png",
    "file_name": "preview.png",
    "url": "https://v3b.fal.media/files/b/lion/jFrzgIJMbaPQi_4HCEa8u_preview.png",
    "file_size": 124859
  },
  "model_urls": {
    "glb": {
      "content_type": "model/gltf-binary",
      "file_name": "model.glb",
      "url": "https://v3b.fal.media/files/b/tiger/pU0TtsRTxXM6VnKEYTHSV_model.glb",
      "file_size": 4097640
    },
    "fbx": {
      "content_type": "application/octet-stream",
      "file_name": "model.fbx",
      "url": "https://v3b.fal.media/files/b/rabbit/agzKf8N8zeVnteg72NiF4_model.fbx",
      "file_size": 4713692
    },
    "obj": {
      "content_type": "text/plain",
      "file_name": "model.obj",
      "url": "https://v3b.fal.media/files/b/zebra/M5aK_b6vKH7KeGCZoSLq7_model.obj",
      "file_size": 2964508
    },
    "usdz": {
      "content_type": "model/vnd.usdz+zip",
      "file_name": "model.usdz",
      "url": "https://v3b.fal.media/files/b/panda/4ItUhLHiH4foEw30qcWZv_model.usdz",
      "file_size": 3886518
    }
  },
  "texture_urls": [
    {
      "base_color": {
        "content_type": "image/png",
        "file_name": "texture_0.png",
        "url": "https://v3b.fal.media/files/b/zebra/opBcVy7AK-GOlCTUz-_GZ_texture_0.png",
        "file_size": 3455709
      }
    }
  ],
  "text_style_prompt": "red and black chest"
}
```


## Usage Examples

### cURL

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

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