Repair Printability API
Repair a 3D model for printability — fix non-manifold edges, degenerate faces, holes, and other topology issues so the mesh is print-ready. Optionally, also thicken walls that are too thin at the size you plan to print.
Create a Repair Printability Task
This endpoint creates a new repair-printability task. The task runs topology repair on a 3D model and returns a watertight, print-ready version.
The task runs in the background. For how long it usually takes, see Processing Times.
The output format matches the input format. If you submit an .stl via model_url, the response's model_urls.stl will hold the repaired mesh and the other format fields will be empty. The input_task_id path always reads the source task's GLB, so the output is .glb.
To also thicken walls that are too thin at the size you plan to print, send printer_type, a print size, or both. Walls are thickened only when more than 5% of the surface is too thin for that printer. The repaired model keeps its original scale; scale it with the Resize API, which takes meters (100 mm is 0.1).
Parameters
Only one of input_task_id or model_url is required. If both are provided, input_task_id takes priority.
Existing textures are removed during repair due to geometry changes. To add textures back, use the Retexture API on the repaired model.
- Name
- input_task_id
- Type
- string
- Required
- Description
The ID of a succeeded task you own. Supported task types: Image to 3D, Multi-Image to 3D, Text to 3D, Remesh, Retexture, and Analyze Printability. The task must have a status of
SUCCEEDEDand must have produced a GLB asset.An analyze task that checked wall thickness also passes on its printer and size, so the repair checks wall thickness, and thickens thin walls, even if you send neither; a
printer_typeor print size you send overrides that value. Analyze tasks created from an.stl,.fbx, or.gltfmodel_urlare not accepted: send the file asmodel_urlinstead.
- Name
- model_url
- Type
- string
- Required
- Description
URL of a 3D model to repair. Supported formats:
.glb,.gltf,.obj,.fbx,.stl. Maximum file size: 100 MB. Must usehttp,https, or adata:URL (data URLs bypass extension checks).Meshy download URLs (
assets.meshy.ai/…?Expires=…&Signature=…) are signed and stop working at the task'sexpires_at; fetching the task again does not renew them. For a model generated with Meshy, passinput_task_idinstead. It works while the source task is retained (see Asset Retention). To reuse a model after that, download it beforeexpires_atand send your own copy.
- Name
- alpha_thumbnail
- Type
- boolean
- default false
- Description
When set to
true, the task additionally renders a transparent-background (RGBA) version of the preview and returns it asalpha_thumbnail_urlon the GET response. The existingthumbnail_urlfield is unchanged.
Send at most one of the two print size fields. If you send printer_type without a size, and no size is reused from an analyze task, the default size is:
.glband anyinput_task_id: 150 mm tall..stl: the file's own longest side, read as millimeters. For an STL in other units, sendintended_print_longest_side_mm..obj,.fbx,.gltf: 150 mm on the longest side.
- Name
- printer_type
- Type
- string
- Description
The printer you plan to use. It sets the minimum wall thickness the repair aims for. Defaults to
fdmwhen you send a print size without it, unless an analyze task passed asinput_task_idsupplies the printer.Available values:
fdm: filament, 1.0 mm minimum wall.sla: resin, 0.8 mm minimum wall.full_color: full-color, 2.0 mm minimum wall.
- Name
- intended_print_height_mm
- Type
- number
- Description
Height of the print, in millimeters. Range:
[1, 1000]. Rounded to the nearest millimeter. GLB input only.
- Name
- intended_print_longest_side_mm
- Type
- number
- Description
Length of the print's longest side, in millimeters. Range:
[1, 1000]. Rounded to the nearest millimeter. Works with every input format.
Returns
The result property of the response contains the id of the newly created repair-printability task.
Failure Modes
- Name
400 - Bad Request- Description
The request was unacceptable. Common causes:
- Missing parameter: neither
input_task_idnormodel_urlwas provided. - Invalid UUID:
input_task_idis not a valid UUID. - Invalid model URL:
model_urlis malformed, uses an unsupported scheme, or has an unsupported file extension. - Model file too large:
model_urlbody exceeded 100 MB. - Model file could not be downloaded:
model_urlreturned an error, most often because a signed Meshy download URL has expired. Fetching the task again returns the same URL with the same expiry, so send your own copy of the file, or useinput_task_idwhile the source task is still retained. - Task not succeeded: the referenced task is still pending, in progress, or failed.
- Missing GLB: the referenced task has no GLB asset to repair.
- Invalid print size:
intended_print_height_mmorintended_print_longest_side_mmis outside[1, 1000], or both were sent. - Unknown printer type:
printer_typeis notfdm,sla, orfull_color. - Height on a non-GLB model:
intended_print_height_mmwas sent with amodel_urlthat is not.glb. Useintended_print_longest_side_mminstead. - Can't size this model by height: at the requested height (or the default 150 mm), the model's longest side would be outside
[1, 1000]mm, the model is flat, or its size can't be determined. Useintended_print_longest_side_mminstead. For a.glbmodel_urland someinput_task_idtasks, this is only found after the task starts, and the task endsFAILEDinstead. - STL size unusable:
printer_typewas sent without a size, and the.stl's own longest side can't be read or is outside[1, 1000]mm. Sendintended_print_longest_side_mm.
- Missing parameter: neither
- Name
401 - Unauthorized- Description
Authentication failed. Please check your API key.
- Name
402 - Payment Required- Description
Common causes:
- Free plan: task creation requires a paid plan. Upgrade at the subscription page.
- Insufficient credits: the workspace credit limit was reached.
- Name
404 - Not Found- Description
The referenced task does not exist or is owned by a different user.
- Name
429 - Too Many Requests- Description
You have exceeded your pending-task quota or rate limit.
Request
# Repair an existing task
curl https://api.meshy.ai/openapi/v1/print/repair \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
}'
# Or repair a model URL directly
curl https://api.meshy.ai/openapi/v1/print/repair \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"model_url": "https://example.com/model.stl"
}'
# Also thicken walls that are too thin for a 100 mm tall SLA print
curl https://api.meshy.ai/openapi/v1/print/repair \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"printer_type": "sla",
"intended_print_height_mm": 100
}'
Response
{
"result": "0193bfc5-ee4f-73f8-8525-44b398884ce9"
}
Retrieve a Repair Printability Task
This endpoint retrieves a repair-printability task by its ID.
Parameters
- Name
- id
- Type
- path
- Description
The ID of the repair-printability task to retrieve.
Returns
The Repair Printability Task Object. The model_urls block is empty until the task reaches SUCCEEDED. Only the model_urls field matching the input format is populated. A wall-thickness repair includes intended_print from the start, and print_repair_report once the task succeeds.
Request
curl https://api.meshy.ai/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000030000,
"expires_at": 1715725401000,
"task_error": null,
"model_urls": {
"glb": "",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10
}
Response (wall thickness checked)
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000090000,
"expires_at": 1715725490000,
"task_error": null,
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10,
"intended_print": {
"printer_type": "sla",
"height_mm": 100,
"longest_side_mm": 118,
"wall_thickness_mm": 0.8,
"dimensions_mm": [118, 72.41, 99.87]
},
"print_repair_report": {
"route": "thin_wall",
"applied": true,
"faces_before": 243112,
"faces_after": 251870,
"thin_area_ratio_before": 0.083,
"thin_area_ratio_after": 0.004
}
}
Delete a Repair Printability Task
This endpoint permanently deletes a repair-printability task and its repaired output. This action is irreversible.
Path Parameters
- Name
- id
- Type
- path
- Description
The ID of the repair-printability task to delete.
Task Status
A task that is still PENDING is deleted and the credits consumed at
create-time are refunded.
A task that is already IN_PROGRESS cannot be deleted: the request is
rejected with 409 Conflict and the task keeps running. Credits for a task
the worker has already started are not refundable, so deleting it mid-run
would cost you the credits and the result both. Wait for it to reach
SUCCEEDED, FAILED or CANCELED, then delete it.
A task in a terminal state (SUCCEEDED, FAILED or CANCELED) is deleted
without a refund.
Returns
Returns 200 OK on success, or 409 Conflict when the task is
IN_PROGRESS.
Request
curl --request DELETE \
--url https://api.meshy.ai/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
// 200 OK on success, with an empty body.
//
// 409 Conflict when the task is IN_PROGRESS — the task is left running:
{
"message": "Task is IN_PROGRESS and cannot be deleted. Credits for a task the worker has already started are not refundable; wait for it to reach SUCCEEDED, FAILED or CANCELED, then delete it."
}
List Repair Printability Tasks
This endpoint allows you to retrieve a list of repair-printability tasks.
Parameters
Optional attributes
- Name
- page_num
- Type
- integer
- Description
Page number for pagination. Starts and defaults to
1.
- Name
- page_size
- Type
- integer
- Description
Page size limit. Defaults to
10items. Maximum allowed is100items.
- Name
- sort_by
- Type
- string
- Description
Field to sort by. Available values:
+created_at: Sort by creation time in ascending order.-created_at: Sort by creation time in descending order.
Returns
Returns a paginated list of Repair Printability Task Objects.
Request
curl https://api.meshy.ai/openapi/v1/print/repair?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
[
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000030000,
"expires_at": 1715725401000,
"task_error": null,
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10
}
]
Stream a Repair Printability Task
This endpoint streams real-time updates for a repair-printability task using Server-Sent Events (SSE).
Parameters
- Name
- id
- Type
- path
- Description
Unique identifier for the repair-printability task to stream.
Returns
Returns a stream of Repair Printability Task Objects as Server-Sent Events.
Every frame carries the full task object for the stage — the same shape the
Get endpoint returns — so while the task is PENDING or IN_PROGRESS the
output fields are simply not populated yet (null, [] or {}) and
finished_at is null. The model_urls block is sent only once the task reaches SUCCEEDED.
Request
curl -N https://api.meshy.ai/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response Stream
// Error event example
event: error
data: {
"status_code": 404,
"message": "Task not found"
}
// Message event examples illustrate task progress.
// Every frame is the full task object; fields not yet populated are null / empty.
// The PENDING frame below is abbreviated to the fields that change.
event: message
data: {
"id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
"progress": 0,
"status": "PENDING"
}
event: message
data: {
"id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000030000,
"expires_at": 1715725401000,
"task_error": null,
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/a43b5c6d-7e8f-901a-234b-567c890d1e2f/output/model.glb?Expires=***",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/a43b5c6d-7e8f-901a-234b-567c890d1e2f/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10
}
The Repair Printability Task Object
- Name
- id
- Type
- string
- Description
Unique identifier for the task. While we use a k-sortable UUID for task ids as the implementation detail, you should not make any assumptions about the format of the id.
- Name
- type
- Type
- string
- Description
Type of the repair-printability task. The value is
print-repair.
- Name
- status
- Type
- string
- Description
Status of the task. Possible values are one of
PENDING,IN_PROGRESS,SUCCEEDED,FAILED,CANCELED.
- Name
- progress
- Type
- integer
- Description
Progress of the task. If the task is not started yet, this property will be
0. Once the task has succeeded, this will become100.
- Name
- preceding_tasks
- Type
- integer
- Description
The count of preceding tasks.
The value of this field is meaningful only if the task status is
PENDING.
- Name
- created_at
- Type
- timestamp
- Description
Timestamp of when the task was created, in milliseconds.
- Name
- started_at
- Type
- timestamp
- Description
Timestamp of when the task was started, in milliseconds. If the task is not started yet, this property will be
0.
- Name
- finished_at
- Type
- timestamp
- Description
Timestamp of when the task was finished, in milliseconds. If the task is not finished yet, this property will be
0.
- Name
- expires_at
- Type
- timestamp
- Description
Timestamp of when the task result will expire from the system, in milliseconds.
0if the task has not yet finished.
- Name
- task_error
- Type
- object
- Description
Error information if the task has failed. This property is
nullif the task has not failed. See Errors for more details.- Name
message- Type
- string
- Description
Error message describing what went wrong.
- Name
- model_urls
- Type
- object
- Description
Downloadable URLs to the repaired 3D model. Only the field matching the input format is populated; the other format fields are empty strings.
- Name
glb- Type
- string
- Description
Downloadable URL to the repaired GLB. Populated when the input was a GLB or when
input_task_idwas used.
- Name
gltf- Type
- string
- Description
Downloadable URL to the repaired GLTF. Populated when the input was a GLTF upload.
- Name
fbx- Type
- string
- Description
Downloadable URL to the repaired FBX. Populated when the input was an FBX upload.
- Name
obj- Type
- string
- Description
Downloadable URL to the repaired OBJ. Populated when the input was an OBJ upload.
- Name
stl- Type
- string
- Description
Downloadable URL to the repaired STL. Populated when the input was an STL upload.
- Name
usdz- Type
- string
- Description
Reserved for USDZ output. Always an empty string for repair-printability tasks.
- Name
3mf- Type
- string
- Description
Reserved for 3MF output. Always an empty string for repair-printability tasks.
- Name
mtl- Type
- string
- Description
Reserved for MTL output. Always an empty string for repair-printability tasks.
- Name
- thumbnail_url
- Type
- string
- Description
URL of a preview image rendered from the repaired model.
- Name
- alpha_thumbnail_url
- Type
- string
- Description
Downloadable URL to a transparent-background (RGBA) version of
thumbnail_url. Only present when the task was created withalpha_thumbnail: trueand the transparent preview was successfully rendered; otherwise this field is omitted.
- Name
- texture_urls
- Type
- array
- Description
Always an empty array. Repair preserves the input geometry only and does not re-bake textures.
- Name
- consumed_credits
- Type
- integer
- Description
The number of credits consumed by this task.
10once the task has reachedSUCCEEDED. Returns0forFAILEDtasks (credits are refunded on failure).
- Name
- intended_print
- Type
- object
- Description
The printer and size the repair used, whether sent or reused from an analyze task. Present on a wall-thickness repair from the start (
PENDING); values not known yet arenull.- Name
printer_type- Type
- string
- Description
fdm,sla, orfull_color.
- Name
height_mm- Type
- number
- Description
The print height in millimeters, if the print was sized by height. Otherwise
null.
- Name
longest_side_mm- Type
- number
- Description
The print's longest side in millimeters. When sized by height, it is calculated from the model's proportions, and is
nulluntil the model has been measured.
- Name
wall_thickness_mm- Type
- number
- Description
The minimum wall thickness for
printer_type, in millimeters.
- Name
dimensions_mm- Type
- array
- Description
The print's
[width, depth, height]in millimeters. The height can differ fromheight_mmby a fraction of a millimeter.nulluntil the task succeeds, and alwaysnullfor non-GLB input.
- Name
- print_repair_report
- Type
- object
- Description
What the wall-thickness repair did. Present once a wall-thickness repair has succeeded.
- Name
route- Type
- string
- Description
Which repair ran. One of:
thin_wall: more than 5% of the surface was too thin, so wall thickening also ran (seeapplied).topology: the walls were thick enough; only the topology repair ran.topology_unmeasured: the walls could not be measured; only the topology repair ran.
- Name
applied- Type
- boolean
- Description
Whether the wall thickening changed the mesh. Only present when
routeisthin_wall.
- Name
faces_before- Type
- integer
- Description
Face count of the input mesh. Only present when
routeisthin_wall.
- Name
faces_after- Type
- integer
- Description
Face count of the repaired mesh. Only present when
routeisthin_wall.
- Name
thin_area_ratio_before- Type
- number
- Description
Share of the input's surface, from
0to1, that was thinner thanintended_print.wall_thickness_mm. Omitted if the input couldn't be measured.
- Name
thin_area_ratio_after- Type
- number
- Description
The same share, measured on the repaired model. Omitted if it couldn't be measured; the task still succeeds.
The Repair Printability Task Object
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000030000,
"expires_at": 1715725401000,
"task_error": null,
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10
}
The Repair Printability Task Object (wall thickness checked)
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-repair",
"status": "SUCCEEDED",
"progress": 100,
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000090000,
"expires_at": 1715725490000,
"task_error": null,
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"gltf": "",
"fbx": "",
"obj": "",
"stl": "",
"usdz": "",
"3mf": "",
"mtl": ""
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [],
"consumed_credits": 10,
"intended_print": {
"printer_type": "sla",
"height_mm": 100,
"longest_side_mm": 118,
"wall_thickness_mm": 0.8,
"dimensions_mm": [118, 72.41, 99.87]
},
"print_repair_report": {
"route": "thin_wall",
"applied": true,
"faces_before": 243112,
"faces_after": 251870,
"thin_area_ratio_before": 0.083,
"thin_area_ratio_after": 0.004
}
}