# TRELLIS.2 Retexture API

> TRELLIS.2 Retexture by Microsoft paints new textures onto an existing 3D mesh (GLB, OBJ, PLY or STL) from a reference image.

Source: https://www.sandbase.ai/models/trellis/trellis-2/retexture
API reference: https://www.sandbase.ai/models/trellis/trellis-2/retexture#api

## Facts

- Provider: trellis
- Type: Image model
- Model ID: `trellis/trellis-2/retexture`
- Price: From $0.24 per run
- Capabilities: 3d to 3d
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "trellis/trellis-2/retexture",
  "image": "https://static.sandbase.ai/examples/trellis/trellis-2/retexture/input_image_1.png",
  "model_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/ClearCoatCarPaint/glTF-Binary/ClearCoatCarPaint.glb",
  "resolution": 1024,
  "texture_size": 2048
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call TRELLIS.2 Retexture through SandBase?

Create a SandBase API key, then send requests with the model ID "trellis/trellis-2/retexture" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate trellis account?

No. One SandBase API key and balance gives you access to TRELLIS.2 Retexture and the other models in the catalog; you do not need to sign up with trellis separately.

## README

### TRELLIS.2 Retexture
TRELLIS.2 Retexture by Microsoft paints new textures onto an existing 3D mesh (GLB, OBJ, PLY or STL) from a reference image.
#### Fields
| Field | Type | Default | Notes |
|---|---|---|---|
| `model_url` | string, required | — | URL of the untextured 3D mesh to retexture. Supports GLB, OBJ, PLY and STL. |
| `image` | image URL, required | — | Reference image for the new texture. |
| `resolution` | `512` / `1024` | `1024` | Internal texture generation resolution. Higher gives finer texture detail, and changes the price. |
| `texture_size` | `1024` / `2048` / `4096` | `2048` | Resolution of the baked texture image. Higher values keep finer surface detail but produce larger files. |
| `seed` | integer | — | Random seed for reproducible results. |
#### Output
- `url`: Main 3D file (GLB unless another export format is selected).
#### Billing
$0.24 per request with default settings. Price by option (other settings at default):
| Option | Price |
|---|---|
| resolution = 512 | $0.20 |
| resolution = 1024 | $0.24 |
Failed runs are not charged.
#### Also on SandBase
Other trellis 3D endpoints: `trellis/trellis`, `trellis/trellis-2`, `trellis/trellis/multi`.
