# 3D Print Check & Repair (Preview)

**Base URL:** `https://openapi.tripo3d.ai/v3`

**Endpoint:** `POST /mesh/print-autofix`

**Preview Notice:** 3D Print Check & Repair is currently in public Preview. Endpoint capabilities, output fields, and billing rules may be adjusted before general availability.
Check whether a 3D model is printable (watertightness, non-manifold geometry, and ratio of walls thinner than 1 mm), and optionally repair the mesh geometry automatically (type: autofix_3d_printer).Pricing- **Check only (autofix_3d_printer omitted or false):** **Free** (no precharge, no billing transaction).
- **Repair (autofix_3d_printer=true) with model_url produced:** **10 credits** (× account batch / VIP discount).
- **Repair (autofix_3d_printer=true) without model_url (already printable or unrepairable):** **Refunded in full** (precharged 10 credits cancelled automatically; task remains status=success, credits_consumed omitted on task query and 0 in usage history / Webhooks).
- **Submission failure, task failure, or expiration:** **Refunded in full**.

Error Codes- 400 / 1004 Missing input: input is required for autofix_3d_printer (task_id, file_token, or URL)
- 400 / 1004 Malformed input: invalid input: must be a valid task_id (UUID), file_token, or URL
- 400 / 1004 Invalid max_size_3d_printer: max_size_3d_printer must be a positive number of millimeters, got 0.0
- 400 / 1004 Non-boolean autofix_3d_printer: autofix_3d_printer must be a boolean, got true
- 400 / 1004 Invalid model: invalid model for autofix_3d_printer; allowed: default
- 400 / 1004 Unsupported / uppercase extension: print autofix source model must use a lowercase extension glb, fbx, stl, ply, obj, usd or usdz, got model.gltf
- 400 / 1004 Source task has no model output: original task has no model output
- 404 / 2001 Source task not found / not owned: The task is not found
- 400 / 2007 Source task not succeeded: The original task is not a succeeded task
- 400 / 2006 Source task output files have expired (past 7-day retention period): Task output files have expired
For authentication, insufficient credits (403 / 2010), rate limits (429 / 2000), external model import failures (400 / 2006), and other common errors, see [Error Handling](https://developers.tripo3d.ai/en/docs/error-handling).



## Request Parameters

### input

- **Type:** string
- **Required:** Required

Model source, accepting one of three formats:**Choose one** of the following formats. When a `file_token` or `URL` is provided, the server synchronously imports the model before running print check/repair (no extra credit cost, though request latency increases).

- task_id (UUID) — a succeeded task owned by the current API key that has a model output (must be within the 7-day asset retention period; expired tasks return `400 / 2006`).
Example: `00000000-0000-0000-0000-000000000001`
- file_token — an upload token returned by [POST /v3/files](https://developers.tripo3d.ai/en/docs/files).
Example: `file_<your-upload-token>`
- URL — a publicly accessible model URL.
Example: `https://example.com/models/sample.glb`



- Source file extension must be lowercase `glb`, `fbx`, `stl`, `ply`, `obj`, `usd`, or `usdz` (uppercase extensions and `.gltf` are rejected).

### model

- **Type:** string
- **Required:** Optional
- **Default:** `default`

Processing model version; only `default` is supported. Any other value returns `400 / 1004`.
### autofix_3d_printer

- **Type:** boolean
- **Required:** Optional
- **Default:** `false`

Whether to run automatic geometry repair. `false` runs printability check only (free). `true` runs geometry repair (precharges 10 credits, confirmed only if a repaired model file is produced; refunded in full otherwise).

Must be a boolean; also validated when passed inside `parameters`.
### max_size_3d_printer

- **Type:** number
- **Required:** Required

Target longest edge of the model in millimeters (mm). Used only to evaluate walls thinner than `1 mm` at scale; does **not** rescale the returned mesh.

Must be a finite number greater than `0` (not a boolean). Also validated when passed inside `parameters`.

## Response Fields

### printable.watertight

- **Type:** boolean
- **Required:** Required

Whether the model is watertight (`true` only when every part is watertight).
### printable.non_manifold

- **Type:** integer
- **Required:** Required

Total count of non-manifold vertices plus non-manifold edges across all parts (`0` when manifold).
### printable.thinwall_ratio

- **Type:** number
- **Required:** Required

Share of surface area thinner than `1 mm` (range `[0, 1]`). Always `-1` when the model is not watertight and wall thickness cannot be measured.
### model_url

- **Type:** string
- **Required:** Optional

Signed download URL for the repaired model. Present only when `autofix_3d_printer=true` and repair actually produced a new model file; omitted for check-only calls, models that are already printable, or meshes that cannot be repaired.

## Request Example

### Check an existing task (free)

```bash
curl --request POST \
  --url https://openapi.tripo3d.ai/v3/mesh/print-autofix \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "00000000-0000-0000-0000-000000000001",
  "model": "default",
  "autofix_3d_printer": false,
  "max_size_3d_printer": 100
}'
```

### Repair from a file_token (up to 10 credits)

```bash
curl --request POST \
  --url https://openapi.tripo3d.ai/v3/mesh/print-autofix \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "file_<your-upload-token>",
  "autofix_3d_printer": true,
  "max_size_3d_printer": 100
}'
```

### Repair from a model URL (up to 10 credits)

```bash
curl --request POST \
  --url https://openapi.tripo3d.ai/v3/mesh/print-autofix \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "https://example.com/models/sample.glb",
  "autofix_3d_printer": true,
  "max_size_3d_printer": 120
}'
```


## Response Example

### Create task

```json
{
  "code": 0,
  "status": "success",
  "data": {
    "task_id": "00000000-0000-0000-0000-000000000002",
    "type": "autofix_3d_printer",
    "status": "queued"
  }
}
```

### Check-only result (free)

```json
{
  "code": 0,
  "status": "success",
  "data": {
    "task_id": "00000000-0000-0000-0000-000000000002",
    "type": "autofix_3d_printer",
    "status": "success",
    "progress": 100,
    "input": {
      "original_model_id": "00000000-0000-0000-0000-000000000001",
      "model_version": "default",
      "autofix_3d_printer": false,
      "max_size_3d_printer": 100.0
    },
    "output": {
      "printable": {
        "watertight": true,
        "non_manifold": 0,
        "thinwall_ratio": 0.000005
      }
    },
    "created_at": "2026-12-01T00:00:00Z",
    "completed_at": "2026-12-01T00:00:18Z"
  }
}
```

### Repair result with new model (10 credits)

```json
{
  "code": 0,
  "status": "success",
  "data": {
    "task_id": "00000000-0000-0000-0000-000000000003",
    "type": "autofix_3d_printer",
    "status": "success",
    "progress": 100,
    "input": {
      "original_model_id": "00000000-0000-0000-0000-000000000001",
      "model_version": "default",
      "autofix_3d_printer": true,
      "max_size_3d_printer": 100.0
    },
    "output": {
      "printable": {
        "watertight": true,
        "non_manifold": 0,
        "thinwall_ratio": 0.000005
      },
      "model_url": "https://cdn.example.com/output/repaired.glb"
    },
    "created_at": "2026-12-01T00:01:00Z",
    "completed_at": "2026-12-01T00:01:42Z",
    "credits_consumed": 10.00,
    "cost_amount": "0.10",
    "currency": "USD",
    "files_expired": false,
    "files_expire_at": "2026-12-09T00:00:00Z"
  }
}
```

### Repair result without new model (refunded in full)

```json
{
  "code": 0,
  "status": "success",
  "data": {
    "task_id": "00000000-0000-0000-0000-000000000004",
    "type": "autofix_3d_printer",
    "status": "success",
    "progress": 100,
    "input": {
      "original_model_id": "00000000-0000-0000-0000-000000000001",
      "model_version": "default",
      "autofix_3d_printer": true,
      "max_size_3d_printer": 100.0
    },
    "output": {
      "printable": {
        "watertight": false,
        "non_manifold": 3,
        "thinwall_ratio": -1
      }
    },
    "created_at": "2026-12-01T00:02:00Z",
    "completed_at": "2026-12-01T00:02:15Z"
  }
}
```
