> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# TRELLIS.2 4B

> TRELLIS.2 image-to-3D model that turns a reference image into a textured GLB asset with resolution, seed, mesh, texture, and export controls.

![TRELLIS.2 4B](https://media.empiriolabs.ai/model-logos/trellis-2-4b.png)

[Microsoft](/providers/microsoft) · 3D Generation

`POST /v1/3d/generations`

TRELLIS.2 image-to-3D model that turns a reference image into a textured GLB asset with resolution, seed, mesh, texture, and export controls.

## At a glance

| Field               | Value                                                                        |
| ------------------- | ---------------------------------------------------------------------------- |
| Model id            | `trellis-2-4b`                                                               |
| Model release date  | -                                                                            |
| Input modalities    | Image                                                                        |
| Output modalities   | 3D                                                                           |
| Context window      | -                                                                            |
| Weight precision    | Mixed BF16/FP16                                                              |
| Features            | image\_to\_3d, glb\_output, pbr\_materials, seed\_control, commercial\_ready |
| Native inference    | Yes                                                                          |
| New                 | No                                                                           |
| Supported endpoints | `POST /v1/3d/generations`                                                    |
| Alternate model ids | `microsoft/trellis.2-4b`, `trellis-2`                                        |

## Pricing

| Charge     | Spec        | Rate                 |
| ---------- | ----------- | -------------------- |
| 512 asset  | per request | \$0.025 (was \$0.25) |
| 1024 asset | per request | \$0.249 (was \$0.30) |
| 1536 asset | per request | \$0.499              |

## Example request

```bash
curl https://api.empiriolabs.ai/v1/3d/generations \
  -H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model": "trellis-2-4b", "image_url": "https://example.com/product-photo.png", "resolution": "1024", "texture_size": "2048"}'
```

## Parameters

| Parameter                            | Type    | Required | Default          | Description                                                                                                                             |
| ------------------------------------ | ------- | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `image`                              | image   | yes      | -                | Reference image URL, data URI, or uploaded image object.                                                                                |
| `resolution`                         | enum    | no       | `"1024"`         | Voxel grid resolution. Higher values are slower and more detailed. · Allowed: `512`, `1024`, `1536`                                     |
| `pipeline_type`                      | enum    | no       | `"1024_cascade"` | Explicit TRELLIS pipeline. Leave on 1024 cascade unless you need the 512 or 1536 path. · Allowed: `512`, `1024_cascade`, `1536_cascade` |
| `seed`                               | integer | no       | `42`             | Random seed for reproducible generations. · Range: 0 – 2147483647                                                                       |
| `preprocess_image`                   | boolean | no       | true             | Remove background and normalize the reference image before generation.                                                                  |
| `max_num_tokens`                     | integer | no       | `49152`          | Maximum sparse tokens used for cascade generation. · Range: 1024 – 131072                                                               |
| `ss_sampling_steps`                  | integer | no       | `12`             | Sampler steps for sparse structure generation. · Range: 1 – 64                                                                          |
| `ss_guidance_strength`               | number  | no       | `7.5`            | Guidance strength for sparse structure generation. · Range: 0 – 20                                                                      |
| `ss_guidance_rescale`                | number  | no       | `0.7`            | Guidance rescale for sparse structure generation. · Range: 0 – 2                                                                        |
| `ss_guidance_interval_start`         | number  | no       | `0.6`            | Start of the sparse-structure guidance interval. · Range: 0 – 1                                                                         |
| `ss_guidance_interval_end`           | number  | no       | `1`              | End of the sparse-structure guidance interval. · Range: 0 – 1                                                                           |
| `ss_rescale_t`                       | number  | no       | `5`              | Rescale temperature for sparse structure generation. · Range: 0 – 20                                                                    |
| `shape_slat_sampling_steps`          | integer | no       | `12`             | Sampler steps for shape structured latent generation. · Range: 1 – 64                                                                   |
| `shape_slat_guidance_strength`       | number  | no       | `7.5`            | Guidance strength for shape structured latent generation. · Range: 0 – 20                                                               |
| `shape_slat_guidance_rescale`        | number  | no       | `0.5`            | Guidance rescale for shape structured latent generation. · Range: 0 – 2                                                                 |
| `shape_slat_guidance_interval_start` | number  | no       | `0.6`            | Start of the shape SLat guidance interval. · Range: 0 – 1                                                                               |
| `shape_slat_guidance_interval_end`   | number  | no       | `1`              | End of the shape SLat guidance interval. · Range: 0 – 1                                                                                 |
| `shape_slat_rescale_t`               | number  | no       | `3`              | Rescale temperature for shape structured latent generation. · Range: 0 – 20                                                             |
| `tex_slat_sampling_steps`            | integer | no       | `12`             | Sampler steps for texture structured latent generation. · Range: 1 – 64                                                                 |
| `tex_slat_guidance_strength`         | number  | no       | `1`              | Guidance strength for texture structured latent generation. · Range: 0 – 20                                                             |
| `tex_slat_guidance_rescale`          | number  | no       | `0`              | Guidance rescale for texture structured latent generation. · Range: 0 – 2                                                               |
| `tex_slat_guidance_interval_start`   | number  | no       | `0.6`            | Start of the texture SLat guidance interval. · Range: 0 – 1                                                                             |
| `tex_slat_guidance_interval_end`     | number  | no       | `0.9`            | End of the texture SLat guidance interval. · Range: 0 – 1                                                                               |
| `tex_slat_rescale_t`                 | number  | no       | `3`              | Rescale temperature for texture structured latent generation. · Range: 0 – 20                                                           |
| `texture_size`                       | enum    | no       | `"2048"`         | Texture resolution baked onto the GLB material. · Allowed: `1024`, `2048`, `4096`                                                       |
| `decimation_target`                  | integer | no       | `500000`         | Approximate target vertex count for the exported mesh. · Range: 10000 – 1000000                                                         |
| `remesh`                             | boolean | no       | true             | Rebuild mesh topology before UV unwrapping and texture baking.                                                                          |
| `remesh_band`                        | number  | no       | `1`              | Remeshing band size. · Range: 0 – 5                                                                                                     |
| `remesh_project`                     | number  | no       | `0.9`            | Projection factor used during remeshing. · Range: 0 – 1                                                                                 |
| `uv_unwrap_angle_threshold_deg`      | number  | no       | `90`             | Cone half-angle threshold used for UV unwrap clustering. · Range: 1 – 180                                                               |
| `uv_unwrap_refine_iterations`        | integer | no       | `0`              | UV clustering refinement iterations. · Range: 0 – 10                                                                                    |
| `uv_unwrap_global_iterations`        | integer | no       | `1`              | Global UV clustering iterations. · Range: 0 – 10                                                                                        |
| `uv_unwrap_smooth_strength`          | number  | no       | `1`              | UV cluster smoothing strength. · Range: 0 – 10                                                                                          |
| `response_format`                    | enum    | no       | `"url"`          | Return signed media URLs by default, or inline base64 JSON when requested. · Allowed: `url`, `b64_json`                                 |
| `verbose`                            | boolean | no       | false            | Enable verbose mesh export logging.                                                                                                     |

## Notes

**Defaults**

* 1024 cascade pipeline
* 12 sampler steps per stage
* 2048 texture size
* 500k decimation target
* GLB output

**Controls**

Supports image URL or upload, 512/1024/1536 resolution, seed, pipeline type, sampler guidance/interval/rescale controls, texture size, mesh decimation, remeshing, UV unwrap tuning, and URL or base64 output. Billing is per generated 3D asset.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/trellis-2-4b`.