lowpoly retires Oct 30, 2026. Please switch models before these dates to avoid request errors. See all deprecations

Repair Printability API

Repair a 3D model so it's ready to print. Meshy fixes non-manifold edges, degenerate faces, holes, and other topology issues. You can also thicken walls that are too thin at the size you plan to print.


POST/openapi/v1/print/repair

Create a Repair Printability task

Creates a Repair Printability task, which repairs a 3D model's topology and returns a watertight version ready to print. The task runs in the background. For how long a task usually takes, see Processing times.

The repaired model has the same format as the input. For example, for an .stl file in model_url, model_urls.stl holds the repaired mesh, and model_urls has no other format keys. With input_task_id, Meshy always repairs the source task's GLB file, so the output is a .glb file.

Meshy removes the model's textures during repair, because the geometry changes. To add textures back, send the repaired model to the Retexture API.

Request

POST
/openapi/v1/print/repair
# 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"
}

Parameters

  • Name
    input_task_id
    Type
    string
    Required
    Description

    Required unless you send model_url. The ID of the task whose model you want to repair, for example an Image to 3D, Multi-Image to 3D, Text to 3D, Remesh, Retexture, or Analyze Printability task. The task must be one you created with the API, with the status SUCCEEDED and a GLB model.

    An Analyze Printability task that checked wall thickness also passes on its printer and size. The repair then checks wall thickness and thickens thin walls, even if you send neither. A printer_type or print size you send replaces the one from the analysis. An Analyze Printability task of an .stl, .fbx, or .gltf file from model_url doesn't work. Send that file as model_url instead.

  • Name
    model_url
    Type
    string
    Required
    Description

    Required unless you send input_task_id. The model to repair, as a public URL or a data URI. If you send both, Meshy uses input_task_id.

    From an http or https URL, the model must be a .glb, .gltf, .obj, .fbx, or .stl file of at most 400 MB. A data URI can hold only a base64 GLB (data:model/gltf-binary;base64,...) or glTF (data:model/gltf+json;base64,...) file of at most 100 MB. Send an .obj, .fbx, or .stl file as an http or https URL.

    A file over 100 MB must also follow these rules:

    • A GLB, glTF, FBX, or OBJ file can have at most 10,000,000 faces. Meshy counts faces as triangles, so a quad counts as 2, and a mesh drawn more than once counts once per copy.
    • An FBX file must be binary FBX 7.1 or newer.
    • A GLB or glTF file must not use Draco compression.

    A Meshy download URL (assets.meshy.ai/…?Expires=…&Signature=…) is signed and stops working at its task's expires_at. Reading the task again doesn't renew it. For a model you made with Meshy, send input_task_id instead, which works while Meshy keeps the source task (see Asset retention). To use the model after that, download it before expires_at and send your own copy.

  • Name
    alpha_thumbnail
    Type
    boolean
    default false
    Description

    Whether to also render a preview with a transparent background (RGBA), returned in alpha_thumbnail_url when you get the task. thumbnail_url doesn't change.

To also thicken walls that are too thin at the size you plan to print, send printer_type, a print size, or both. Meshy thickens the walls only when more than 5% of the surface is too thin for that printer. The repaired model keeps its original scale. To scale it, use the Resize API, which takes sizes in meters, so 100 mm is 0.1.

  • Name
    printer_type
    Type
    string
    Description

    The printer you plan to use. It sets the minimum wall thickness the repair aims for. If you send a print size without printer_type, Meshy uses fdm, unless an Analyze Printability task in input_task_id supplies 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

    Any other value returns 400.

  • Name
    intended_print_height_mm
    Type
    number
    Description

    The height of the print, in millimeters, from 1 to 1000. A value outside the range returns 400. Send this or intended_print_longest_side_mm, not both.

    It works only with GLB input. For a model_url that isn't a .glb file, send intended_print_longest_side_mm instead.

  • Name
    intended_print_longest_side_mm
    Type
    number
    Description

    The length of the print's longest side, in millimeters, from 1 to 1000. A value outside the range returns 400. It works with every input format.

If you send printer_type without a size, and Meshy reuses no size from an Analyze Printability task, Meshy uses this print size:

  • .glb file or any input_task_id: 150 mm tall
  • .stl file: the file's own longest side, read as millimeters
  • .obj, .fbx, or .gltf file: 150 mm on the longest side

For an STL file in other units, send intended_print_longest_side_mm.

Meshy rounds both print sizes to the nearest millimeter.

Returns

The result field of the response holds the ID of the new Repair Printability task.

Failure modes

  • Name
    400 - Bad Request
    Description

    The request can't run. The error message says which problem it found. For example:

    • Missing parameter: Neither input_task_id nor model_url was sent.
    • Invalid UUID: input_task_id isn't a valid UUID.
    • Invalid model URL: model_url is malformed, uses an unsupported scheme, or has an unsupported file extension.
    • Model file too large: The model_url file is over 400 MB from an http or https URL, or over 100 MB as a data URI.
    • Too many faces: The model_url file is a GLB, glTF, FBX, or OBJ file over 100 MB with more than 10,000,000 faces. Reduce the face count, then send the file again.
    • ASCII FBX over 100 MB: The model_url file is an ASCII FBX over 100 MB. Send it as binary FBX or GLB.
    • Unreadable model file: The model_url file is over 100 MB, and Meshy can't read its header. For example, it's a Draco-compressed GLB or glTF, or a binary FBX older than 7.1.
    • Model header too complex: The model_url file is over 100 MB, and its header has too many meshes, nodes, or records to check. Reduce the number of objects in the file, then send it again.
    • Model file can't be downloaded: model_url returned an error, most often because a signed Meshy download URL expired. Reading the task again returns the same URL with the same expiry. Send your own copy of the file, or send input_task_id while Meshy keeps the source task.
    • Task not succeeded: The input_task_id task is still pending, in progress, or failed.
    • Missing GLB: The input_task_id task has no GLB model to repair.
    • Invalid print size: intended_print_height_mm or intended_print_longest_side_mm is outside 1 to 1000, or the request has both.
    • Unknown printer type: printer_type isn't fdm, sla, or full_color.
    • Height on a non-GLB model: The request has intended_print_height_mm and a model_url that isn't a .glb file. Send intended_print_longest_side_mm instead.
    • 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 to 1,000 mm. It also happens when the model is flat, or when Meshy can't determine its size. Send intended_print_longest_side_mm instead. For a .glb model_url and some input_task_id tasks, Meshy finds this only after the task starts, and the task ends as FAILED instead.
    • STL size unusable: The request has printer_type without a size, and Meshy can't read the .stl file's own longest side, or it's outside 1 to 1,000 mm. Send intended_print_longest_side_mm.

    Fix the request, then send it again. See Errors.

  • Name
    401 - Unauthorized
    Description

    The API key is missing or invalid. Check the Authorization header.

  • Name
    402 - Payment Required
    Description

    For example:

    • Insufficient credits: The account doesn't have enough credits for this task, or the account reached a credit limit. Check your credit balance, then retry.
    • Free plan: Creating a task requires a paid plan. Upgrade your plan in your subscription settings, then retry.
  • Name
    403 - Forbidden
    Description

    input_task_id is a bas-relief model, which this endpoint can't repair. The message is This model type does not support this operation. Send a different model.

  • Name
    404 - Not Found
    Description

    The input_task_id task doesn't exist or belongs to another user. Check the ID, and use an API key from the account that created the task.

  • Name
    429 - Too Many Requests
    Description

    You exceeded your rate limit, or you have too many pending tasks. Wait, then retry. See Rate limits.


GET/openapi/v1/print/repair/:id

Get a Repair Printability task

Returns a Repair Printability task by its ID.

Request

GET
/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f
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": {
    "stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***"
  },
  "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=***"
  },
  "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
  }
}

Parameters

  • Name
    id
    Type
    path
    Description

    The task ID from the create response.

Returns

The Repair Printability task object. Its model_urls field is empty until the task is SUCCEEDED. After that, it has only the key that matches the input format. A wall-thickness repair includes intended_print from the start, and print_repair_report after the task succeeds.


DELETE/openapi/v1/print/repair/:id

Delete a Repair Printability task

Permanently deletes a Repair Printability task, including its repaired model. You can't undo a delete.

Request

DELETE
/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f
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 keeps 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."
}

Path parameters

  • Name
    id
    Type
    path
    Description

    The ID of the task to delete.

Task status

Deleting a PENDING task refunds the credits it used when you created it.

An IN_PROGRESS task can't be deleted. The request returns 409 Conflict, and the task keeps running. Meshy doesn't refund a task that has started, so deleting it would cost you both the credits and the result. Wait for it to reach SUCCEEDED, FAILED, or CANCELED, then delete it.

Deleting a task in a final status (SUCCEEDED, FAILED, or CANCELED) doesn't refund its credits.

Returns

200 OK when the task is deleted, or 409 Conflict when the task is IN_PROGRESS.


GET/openapi/v1/print/repair

List Repair Printability tasks

Returns a list of your Repair Printability tasks.

Request

GET
/openapi/v1/print/repair
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=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
    "texture_urls": [],
    "consumed_credits": 10
  }
]

Parameters

  • Name
    page_num
    Type
    integer
    default 1
    Description

    The page number to return, starting at 1.

  • Name
    page_size
    Type
    integer
    default 10
    Description

    The number of tasks per page, up to 100.

  • Name
    sort_by
    Type
    string
    Description

    The sort order.

    Available values:

    • +created_at: oldest first
    • -created_at: newest first

Returns

A paginated list of Repair Printability task objects.


GET/openapi/v1/print/repair/:id/stream

Stream a Repair Printability task

Streams a Repair Printability task's updates as Server-Sent Events (SSE).

Request

GET
/openapi/v1/print/repair/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream
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 following PENDING frame 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=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/a43b5c6d-7e8f-901a-234b-567c890d1e2f/output/preview.png?Expires=***",
  "texture_urls": [],
  "consumed_credits": 10
}

Parameters

  • Name
    id
    Type
    path
    Description

    The task ID from the create response.

Returns

A stream of Repair Printability task objects as Server-Sent Events.

Each event holds the full task object, in the same shape the Get endpoint returns. While the task is PENDING or IN_PROGRESS, its output fields are empty (null, [], or {}), and finished_at is 0. model_urls is an empty object until the task is SUCCEEDED.


The Repair Printability task object

A Repair Printability task object describes one repair of a 3D model. It holds the status, the progress, and the repaired model when the task 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=***"
  },
  "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=***"
  },
  "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
  }
}
  • Name
    id
    Type
    string
    Description

    The task ID. Treat it as an opaque string, and don't rely on its format.

  • Name
    type
    Type
    string
    Description

    The task type, always print-repair.

  • Name
    status
    Type
    string
    Description

    The task status, one of PENDING, IN_PROGRESS, SUCCEEDED, FAILED, or CANCELED.

  • Name
    progress
    Type
    integer
    Description

    How much of the task is done, as a percentage. It's 0 until the task starts and 100 when it succeeds.

  • Name
    preceding_tasks
    Type
    integer
    Description

    The number of tasks ahead of this one in the queue. The value is meaningful only while the task is PENDING.

  • Name
    created_at
    Type
    timestamp
    Description

    Time the task was created, in Unix milliseconds.

  • Name
    started_at
    Type
    timestamp
    Description

    Time the task started, in Unix milliseconds. It's 0 until the task starts.

  • Name
    finished_at
    Type
    timestamp
    Description

    Time the task finished, in Unix milliseconds. It's 0 until the task finishes.

  • Name
    expires_at
    Type
    timestamp
    Description

    Time the task's result expires, in Unix milliseconds. It's 0 until the task finishes.

  • Name
    task_error
    Type
    object
    Description

    The error details when the task fails. It's null if the task hasn't failed. See Errors.

    • Name
      message
      Type
      string
      Description

      A description of what went wrong.

  • Name
    model_urls
    Type
    object
    Description

    Download URLs for the repaired model. It has only the key that matches the input format. A format the task didn't generate has no key, rather than an empty string.

    • Name
      glb
      Type
      string
      Description

      The repaired GLB file. Set when the input was a GLB file or you sent input_task_id.

    • Name
      gltf
      Type
      string
      Description

      The repaired glTF file. Set when the input was a glTF file.

    • Name
      fbx
      Type
      string
      Description

      The repaired FBX file. Set when the input was an FBX file.

    • Name
      obj
      Type
      string
      Description

      The repaired OBJ file. Set when the input was an OBJ file.

    • Name
      stl
      Type
      string
      Description

      The repaired STL file. Set when the input was an STL file.

  • Name
    thumbnail_url
    Type
    string
    Description

    Download URL for a preview image of the repaired model.

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    Download URL for a version of thumbnail_url with a transparent background (RGBA). Present only when you created the task with alpha_thumbnail: true and Meshy rendered the transparent preview.

  • Name
    texture_urls
    Type
    array
    Description

    Always an empty array. Repair keeps only the input geometry and doesn't re-bake textures.

  • Name
    consumed_credits
    Type
    integer
    Description

    The number of credits the task used. It's 10 when the task is SUCCEEDED, and 0 for a FAILED task, because Meshy refunds the credits when a task fails.

  • Name
    intended_print
    Type
    object
    Description

    The printer and size the repair used, whether you sent them or Meshy reused them from an Analyze Printability task. Present on a wall-thickness repair from the start, including while the task is PENDING. A value Meshy doesn't know yet is null.

    • Name
      printer_type
      Type
      string
      Description

      The printer type, fdm, sla, or full_color.

    • Name
      height_mm
      Type
      number
      Description

      The print height, in millimeters, when the print is sized by height. Otherwise, it's null.

    • Name
      longest_side_mm
      Type
      number
      Description

      The length of the print's longest side, in millimeters. When the print is sized by height, Meshy calculates it from the model's proportions, and it's null until Meshy measures the model.

    • 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 from height_mm by a fraction of a millimeter. It's null until the task succeeds, and always null for input other than GLB.

  • Name
    print_repair_report
    Type
    object
    Description

    What the wall-thickness repair did. Present after a wall-thickness repair succeeds.

    • 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. To see whether it changed the mesh, check applied.
      • topology: the walls were thick enough, so only the topology repair ran.
      • topology_unmeasured: Meshy couldn't measure the walls, so only the topology repair ran.
    • Name
      applied
      Type
      boolean
      Description

      Whether the wall thickening changed the mesh. Present only when route is thin_wall.

    • Name
      faces_before
      Type
      integer
      Description

      The face count of the input mesh. Present only when route is thin_wall.

    • Name
      faces_after
      Type
      integer
      Description

      The face count of the repaired mesh. Present only when route is thin_wall.

    • Name
      thin_area_ratio_before
      Type
      number
      Description

      The share of the input's surface thinner than intended_print.wall_thickness_mm, from 0 to 1. Left out when Meshy couldn't measure the input.

    • Name
      thin_area_ratio_after
      Type
      number
      Description

      The same share, measured on the repaired model. Left out when Meshy couldn't measure it. The task still succeeds.