lowpoly retires Oct 30, 2026. meshy-7 for 3D generation retires Dec 31, 2026; as a texture model it stays available. Please switch models before these dates to avoid request errors. See all deprecations

Repair Printability API

Repair a 3D model for printing. Meshy closes holes, fixes broken geometry, and thickens walls too thin for your printer.


POST/openapi/v2/print/repair

Create a Repair Printability task

Creates a Repair Printability task and returns the task object. The task runs in the background. To read its result, see Get the result. For how long a task usually takes, see Processing times.

To see what needs fixing first, run Analyze Printability, which is free. If the analysis read a task, or a GLB or OBJ file, you can then send its id here as input_task_id.

PreviewChange a value under “Try and preview” to update
Faces30,838
Cost10 credits
Request
curl https://api.meshy.ai/openapi/v2/print/repair \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "01a1aeae-1d29-72f0-96ed-0ba2bda780ec"
  }'
Response
Loading…

Parameters

  • Name
    input_task_id
    Type
    string
    Required
    Description

    Required unless you send model_url. The ID of a task with a GLB model, for example Text to 3D, Image to 3D, Remesh, or Retexture. The task must be one you created with the API, and have the status SUCCEEDED.

    An Analyze Printability task also works, if it analyzed a task or a GLB or OBJ file. The repair then uses the printer type and print size of that analysis. To use a different printer type or size, send your own. If the analysis checked no print size, the repair uses the default one.

  • 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 (data:model/gltf-binary;base64,...). Sending both input_task_id and model_url returns 400.

    A URL must point to a GLB, STL, OBJ, FBX, or glTF file of at most 400 MB. A data URI must hold a GLB or glTF file of at most 100 MB. A larger file returns 400.

    A GLB, glTF, FBX, or OBJ file over 100 MB 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. Over 100 MB, an FBX file must be binary FBX 7.1 or newer, and a GLB or glTF file must not use Draco compression. A file that breaks these rules returns 400.

    A Meshy download URL, from the output of one of your tasks, is signed and stops working at that 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 for as long as Meshy keeps the task's files (see Asset retention). To use the model after that, download it before expires_at and send your own copy.

Meshy also checks for walls too thin to print. When more than 5% of the surface is thinner than the printer's thinnest wall, Meshy thickens the walls. Otherwise, it repairs only the geometry. A repair takes about 20 seconds, or about 100 seconds when Meshy thickens the walls. A model with thickened walls has about 1,000,000 faces.

To judge the walls at your own print, send a printer type, a print size, or both. Without them, Meshy uses fdm and a default print size that depends on the format. The size tells Meshy how big you plan to print the model. Meshy doesn't scale the model to it. To scale the repaired model, send its task id as input_task_id to Resize, which takes sizes in meters, so 100 mm is 0.1.

  • Name
    printer_type
    Type
    string
    default fdm
    Description

    The printer you plan to use. It sets the thinnest wall that prints.

    Try and preview

    Available values:

    • fdm: 1.0 mm
    • sla: 0.8 mm
    • full_color: 2.0 mm

    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 this range returns 400. Send this or intended_print_longest_side_mm, not both. Sending both returns 400.

    Try and preview

    For model_url, only a GLB file has a known up direction. A height with another format returns 400, so send intended_print_longest_side_mm instead.

    Meshy also checks the print's longest side. It uses the model's proportions to calculate that length at the specified height, and the result must be from 1 to 1,000 mm. If the model is wider or deeper than it is tall, a height near 1,000 mm can fail even though the height itself is within range. To make the print's longest side close to 1,000 mm, use intended_print_longest_side_mm instead.

    If Meshy can't convert the height for the model, send intended_print_longest_side_mm instead. For most input_task_id models, the request returns 400, for example when the height puts the model's longest side outside 1 to 1,000 mm. For a GLB model_url, or a very large input model, Meshy converts the height while the task runs. If that fails, the task fails with task_error.type set to invalid_input, and Meshy refunds its credits.

  • 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 this range returns 400. It works with every input format.

  • Name
    thumbnail_resolution
    Type
    integer
    default 512
    Description

    The width and height, in pixels, of the task's preview images: 512 or 1024. It applies to output.thumbnail_url and to any optional preview you request. Any other value returns 400.

If you send no size, Meshy uses this print size:

  • 150 mm tall, for a task or a GLB file
  • 150 mm on the longest side, for an OBJ, FBX, or glTF file
  • The STL file's own size, read in millimeters. If Meshy can't read it, or it's outside 1 to 1,000 mm, Meshy uses 150 mm on the longest side.

If Meshy can't work out a 150 mm tall print for a model, it uses 150 mm on the longest side. This happens when Meshy can't measure the model, or when 150 mm tall would make its longest side over 1,000 mm.

Meshy rounds sizes to whole millimeters.

Returns

202 Accepted with the task object. The task starts as PENDING, with your request in input and output set to null. The top-level intended_print is already there. See Repair Printability output.

Two response headers help you read the task:

  • Location: the task's URL on Tasks
  • Retry-After: how many seconds to wait before you first read it

Failure modes

  • Name
    400 - Bad Request
    Description

    The request can't run. For example:

    • Neither input_task_id nor model_url was sent (Either input_task_id or model_url is required).
    • Both input_task_id and model_url were sent (Send either "input_task_id" or "model_url", not both.).
    • The input task hasn't succeeded, or has no GLB model. The code input_task_expired means its model was deleted.
    • model_url has an unsupported extension or is too large.
    • model_url can't be downloaded (code input_download_failed), most often because it's a Meshy download URL past its expires_at. Reading the task again returns the same URL, so send input_task_id while Meshy keeps the task's files, or your own copy of the file.
    • A model_url file over 100 MB has too many faces (model has too many faces: <N> faces, the limit for files over 100 MB is <limit>). Reduce the face count, then send the file again.
    • An FBX file over 100 MB is ASCII (ASCII FBX files over 100 MB are not supported; use binary FBX or GLB). Send it as binary FBX or GLB.
    • A file over 100 MB has a header Meshy can't read, such as a Draco-compressed GLB or glTF, or a binary FBX older than 7.1 (invalid model file content).
    • A file over 100 MB has a header too complex to check (model header is too complex to check for files over 100 MB).
    • Both print sizes were sent.
    • printer_type isn't fdm, sla, or full_color.
    • A height was sent with a model_url that isn't a GLB file.
    • A height puts the input task's longest side outside 1 to 1,000 mm. Send intended_print_longest_side_mm instead.

    The error message says which problem it found. See Errors.

  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

    One of these applies:

    • The account doesn't have enough credits.
    • The account reached a credit limit.
    • The account is on the free plan.

    Check your credits and plan, 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

    input_task_id doesn't match any of your tasks. The message is input_task_id does not match any of your tasks. Check the ID, and use an API key from the account that created the task.

    A task of yours past its retention period returns the code input_task_expired instead.

  • Name
    429 - Too Many Requests
    Description

    One of these limits was reached:

    • You sent too many requests. Wait the number of seconds in Retry-After, then retry.
    • Too many of your tasks are queued or running. Wait for some to finish, then retry.
    • On an unlimited plan with no credits left, you reached the number of tasks that can run without credits. Wait for a task to finish, or add credits.

Get the result

Read Repair Printability tasks the same way as every other v2 task, through the Tasks routes. To list only Repair Printability tasks, filter by type=print-repair.


Repair Printability output

When the task succeeds, output holds these fields. The rest of the task object is the same for every task type. The URLs in output stop working at expires_at.

Request
curl https://api.meshy.ai/openapi/v2/tasks/01a1af8e-2fd0-72aa-826e-5251071c0a76 \
  -H "Authorization: Bearer ${MESHY_API_KEY}"
Response
Loading…
  • Name
    model_urls
    Type
    object
    Description

    Signed URL to the repaired model, as one file in the input's format. The key is glb for an input_task_id, or the format of the model_url file, for example stl. The model keeps its size. Repair removes the model's textures, because it rebuilds the geometry. To add textures back, send this task's id to Retexture as input_task_id.

  • Name
    thumbnail_url
    Type
    string
    Description

    Signed URL to a PNG preview of the repaired model, without textures and with a transparent background.

  • Name
    print_repair_report
    Type
    object | null
    Description

    What the thin-wall check found and did, with these fields:

    • route: which repair ran
      • thin_wall: more than 5% of the surface was too thin, so Meshy thickened the walls
      • topology: Meshy repaired only the geometry
      • topology_unmeasured: Meshy couldn't measure the thin walls
    • applied: false when thickening changed nothing. Only on the thin_wall route.
    • faces_before: the face count before thickening. Only on the thin_wall route.
    • faces_after: the face count after thickening, which can be much higher. Only on the thin_wall route.
    • thin_area_ratio_before: the share of the surface thinner than the wall limit before the repair, from 0 to 1. Left out if Meshy couldn't measure it.
    • thin_area_ratio_after: the same share after the repair. Left out if Meshy couldn't measure it.

    null for a task created on v1 without a printer type or print size.

The task object also has intended_print at the top level, from the create response on. A task created on v1 without a printer type or print size doesn't have it. It has these fields:

  • printer_type
  • height_mm: null when the print is sized by its longest side
  • longest_side_mm: when you size by height, it can be null until Meshy measures the model
  • wall_thickness_mm: the thinnest wall that prints
  • dimensions_mm: the print's [width, depth, height] in millimeters, after Meshy measures it. null for formats other than GLB.