# Remesh API

New, clean topology at the face count you choose, laid out the way a modeller would, with the textures baked onto it.

Tool id `remesh` on the REST API (`POST https://3dvalley.com/api/v1/jobs`); MCP tool `edit_model` on https://3dvalley.com/mcp. Paid in credits (1 credit = $0.01), taken when the job starts and given back if it fails. The general rules (keys, idempotency, waiting, webhooks) are in [the API docs](https://3dvalley.com/docs/api).

## Models and prices

| Model | Name | Price | Time | What it is |
|---|---|---|---|---|
| `tripo-remesh` (default) | Tripo | 50 credits | about 430 s | Tripo's retopology: a low-poly mesh laid out the way a modeller would, with the textures baked onto it. Slower, and the model is sent to Tripo for the run. |

## Input

| Field | Required | |
|---|---|---|
| `mesh` | yes | A mesh (GLB, glTF, OBJ, PLY or STL) as an https URL, an upload id (upl_...), a library id (ph:wooden_barrel_01) or an earlier job (job_... or its asset id 3dv:...). |

## Options

| Option | Type | Values | |
|---|---|---|---|
| `faces` | integer | from 500 to 20000 | About how many faces: 500 to 20,000 (up to 10,000 as quads). Without it the model picks. |
| `topology` | string | `quads`, `triangles` | Quads or triangles. Default `quads`. |

## Output

Files: `glb`.

## Example

```
curl -X POST https://3dvalley.com/api/v1/jobs \
  -H "Authorization: Bearer $THREEDVALLEY_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Prefer: wait=50" \
  -H "Content-Type: application/json" \
  -d '{"tool":"remesh","input":{"mesh":"job_8Hq2..."},"options":{"faces":5000,"topology":"quads"}}'
```

From an MCP client:

```
edit_model({"operation":"remesh","mesh":"job_8Hq2...","options":{"faces":5000,"topology":"quads"}})
```

## Limits

- `max_image_bytes`: 10,485,760
- `max_mesh_bytes`: 62,914,560
