Auto Split API
Split a 3D model into parts you can print separately. Meshy chooses the cuts, or cuts along the parts or color regions you name, and can add connectors. Meshy always reinforces the thin regions a cut leaves, so every part prints solid.
By default, the split model doesn't keep the input's texture. You can split a textured model, so you don't need to regenerate it with should_texture: false. Meshy rebuilds the cut parts and gives each one a flat vertex color. To keep the texture on every part, send keep_texture: true.
Create an Auto Split task
Creates an Auto Split task. The task cuts the model of a previous task into parts you can print separately. It returns the split model, with each part as its own object in the file.
The task runs in the background. For how long a task usually takes, see Processing times.
Request
# Simple request: let Meshy choose the cuts
curl https://api.meshy.ai/openapi/v1/print/split \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
}'
# Advanced request: name the parts, keep the texture, add connectors, export glb and obj
curl https://api.meshy.ai/openapi/v1/print/split \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"mode": "by_parts",
"prompt": "split into the figure and the base",
"target_formats": ["glb", "obj"],
"layout": "on_plate",
"keep_texture": true,
"connectors": true,
"connector_type": "cylinder",
"connector_size": 0.4
}'
Response
{
"result": "0193bfc5-ee4f-73f8-8525-44b398884ce9"
}
Parameters
- Name
- input_task_id
- Type
- string
- Required
- Description
The ID of the task whose model to split. The task must have the status
SUCCEEDED. These task types work:- Image to 3D
- Multi-Image to 3D
- Text to 3D, a preview or refine task
- Retexture
- Remesh
- Convert
- Resize
The model must be generated with Meshy 6 or Meshy 7, that is, with
ai_modelset tomeshy-6-lite,meshy-6,meshy-7,meshy-7.1, orlatest. Smart Topology models (meshy-t2andmeshy-t2.5) aren't supported. For a refine, Retexture, Remesh, Convert, or Resize task, the rule applies to the model the task started from. A Retexture, Remesh, Convert, or Resize task made from an uploaded model returns400.The model can have at most 8,000,000 faces. A model with more faces returns
400. In that case, run a Remesh task on it first, and send the Remesh task's ID instead.You can split a textured model. To keep its texture on the parts, send
keep_texture: true.
- Name
- mode
- Type
- string
- default auto
- Description
How to divide the model into parts.
Available values:
auto: Meshy chooses the cuts and ignoresprompt. Apromptover 600 characters still returns400.by_parts: Meshy cuts along the structural parts you name inprompt, for example head, arms, and torso.by_color: Meshy cuts along the color regions you name inprompt. Meshy finds the regions in the source image, not in the input model's texture. The input must be generated from an uploaded image, with Image to 3D or Multi-Image to 3D. Other inputs return400. For Multi-Image to 3D, Meshy uses the first source image.
mode = by_parts or by_color- Name
- prompt
- Type
- string
- Required
- Description
The parts to split the model into, in any language, up to 600 characters. Longer text returns
400, even whenmodeisauto.Meshy reads 1 to 10 part names from the prompt, so name the parts rather than describing the model. For example,
split into the figure and the baseorhead, torso, left arm, right arm, legs. You can name a single part. Everything you don't name becomes one more part, sothe headsplits the model into the head and the rest, as in the web app.A prompt that asks for no split, or names more than 10 parts, returns
400, and Meshy doesn't charge for it.If Meshy can't read any part names from the prompt, it uses the model's reference image instead. It splits along the parts it finds there, in the mode you chose. The task still runs, Meshy charges for it, and the task has
prompt_ignored: true. If the model has no reference image, or Meshy finds fewer than 2 parts in it, the request returns400, and Meshy doesn't charge for it.
- Name
- target_formats
- Type
- array
- default ["glb"]
- Description
The file formats to generate. Meshy always generates
glband returns it inmodel_urls, plus the other formats you list.Available values:
glbobjfbxstlusdzblend3mf
Every format except
stlsupports scene objects and holds each part as a separate object. An STL file can't hold separate objects, so Meshy fuses the parts into one solid, arranged bylayout. To get parts you can select separately in a slicer, request3mf.With
keep_texture: true, these formats hold the texture:glb,fbx,usdz, andblend: The texture is in the file.obj: The texture is in the material file, whichmodel_urlsreturns undermtl.stland3mf: The file holds geometry only, without the texture.
- Name
- layout
- Type
- string
- default assembled
- Description
How Meshy arranges the parts, in every file format and in the thumbnail.
Available values:
assembled: Meshy keeps the parts where they were in the source model.on_plate: Meshy lays the parts flat and spreads them out on the build plate, ready to slice. This is the same arrangement as the On Plate view in the web app.
In both layouts, Meshy removes any collapsed sliver or point-like piece a cut leaves before export, so every part you get is printable. Formats that support scene objects hold one object per part, and
stlfuses the parts into one solid.
- Name
- keep_texture
- Type
- boolean
- default false
- Description
Whether to keep the input model's texture on the parts.
truegives every part the input's texture, and the task returns the maps intexture_urls.falsegives each part a flat vertex color.With
true, the task takes about twice as long, and the credit cost doesn't change. An untextured input splits the same way as withfalse. If Meshy can't keep the texture, the task fails with the error codetextured_split_refused. See Errors.
- Name
- connectors
- Type
- boolean
- default false
- Description
Whether to add mortise-and-tenon connectors at each cut, so the printed parts fit together.
connectors = true- Name
- connector_type
- Type
- string
- default cube
- Description
The connector's shape at each cut surface,
cubeorcylinder.
- Name
- connector_size
- Type
- number
- default 0.5
- Description
The connector's size, relative to the cut surface, from
0.1to0.8. A value outside this range returns400, even whenconnectorsisfalse.
- Name
- connector_height
- Type
- number
- default 0.1
- Description
How far the connector sticks out of the cut surface, relative to the cut surface, from
0.1to0.8. A value outside this range returns400, even whenconnectorsisfalse.
Returns
The result field of the response holds the ID of the new Auto Split task.
Failure modes
- Name
400 - Bad Request- Description
The request can't run. The error message says which problem it found. For example:
- Missing prompt:
modeisby_partsorby_color, andpromptis missing. - Prompt describes no split, or too many parts: The prompt asks to keep the model in one piece, or names more than 10 parts.
by_partsandby_coloraccept 1 to 10 named parts. Meshy doesn't charge for the request. - Unsupported input task:
input_task_idisn't a succeeded task of a supported type, generated with Meshy 6 or Meshy 7. - No reference image:
modeisby_color, and the input wasn't generated from an uploaded image. - Out-of-range connector:
connector_sizeorconnector_heightis outside0.1to0.8.
Fix the request, then send it again. See Errors.
- Missing prompt:
- Name
401 - Unauthorized- Description
The API key is missing or invalid. Check the
Authorizationheader.
- 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
One of these applies:
- Content moderation blocked the prompt. The message is
explicit contentorprohibited content. Change the prompt, then retry. input_task_idis a bas-relief model, which this endpoint can't split. The message isThis model type does not support this operation. Send a different model.
- Content moderation blocked the prompt. The message is
- Name
404 - Not Found- Description
input_task_iddoesn't exist or doesn't belong to your account. 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. Wait, then retry. See Rate limits.
by_partsandby_colorrequests also share a prompt-reading limit of 12 requests per minute per account.
- Name
503 - Service Unavailable- Description
Splitting by prompt (
by_partsandby_color) is temporarily unavailable. Retry later, or sendmode: "auto", which still works. Meshy doesn't charge for the request.
Get an Auto Split task
Returns an Auto Split task by its ID.
Request
curl https://api.meshy.ai/openapi/v1/print/split/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-split",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"mtl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.mtl?Expires=***"
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [
{
"base_color": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0.png?Expires=***",
"metallic": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_metallic.png?Expires=***",
"normal": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_normal.png?Expires=***",
"roughness": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_roughness.png?Expires=***"
}
],
"part_count": 4,
"progress": 100,
"status": "SUCCEEDED",
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000082000,
"task_error": null,
"consumed_credits": 10
}
Parameters
- Name
- id
- Type
- path
- Description
The task ID from the create response.
Returns
Delete an Auto Split task
Permanently deletes an Auto Split task, including its models and data. You can't undo a delete.
Request
curl --request DELETE \
--url https://api.meshy.ai/openapi/v1/print/split/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.
List Auto Split tasks
Returns a list of your Auto Split tasks.
Request
curl https://api.meshy.ai/openapi/v1/print/split?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
[
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-split",
"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=***",
"part_count": 4,
"progress": 100,
"status": "SUCCEEDED",
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000082000,
"task_error": null,
"consumed_credits": 10
}
]
Parameters
- Name
- page_num
- Type
- integer
- Description
The page number to return. Starts at and defaults to
1.
- Name
- page_size
- Type
- integer
- Description
The number of tasks per page, up to
100. Defaults to10. Meshy treats a larger value as100.
- Name
- sort_by
- Type
- string
- Description
The sort order.
Available values:
+created_at: oldest first-created_at: newest first
Returns
A paginated list of Auto Split task objects.
Stream an Auto Split task
Streams an Auto Split task's updates as Server-Sent Events (SSE).
Request
curl -N https://api.meshy.ai/openapi/v1/print/split/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 (other task fields omitted here for brevity;
// each frame is the full task object).
event: message
data: {
"id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
"progress": 0,
"status": "PENDING"
}
event: message
data: {
"id": "a43b5c6d-7e8f-901a-234b-567c890d1e2f",
"type": "print-split",
"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=***",
"part_count": 4,
"progress": 100,
"status": "SUCCEEDED",
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000082000,
"task_error": null,
"consumed_credits": 10
}
Parameters
- Name
- id
- Type
- path
- Description
The task ID from the create response.
Returns
A stream of Auto Split task objects as Server-Sent Events.
Each message event holds the full task object, the same one Get an Auto Split task returns. That includes consumed_credits, the timestamps, and prompt_ignored. While the task is PENDING or IN_PROGRESS, the fields that change between events are progress, status, started_at, and preceding_tasks. model_urls and thumbnail_url get their values, and part_count appears, when the task reaches SUCCEEDED.
An error event holds only status_code and message, so check the event name before you read status.
The Auto Split task object
An Auto Split task object describes one split of a 3D model. It holds the status, the progress, and the part files when the task succeeds.
It doesn't include the prompt fields of other task objects, such as name, object_prompt, and texture_prompt. It also has no single model_url. thumbnail_url, model_urls, and the timestamps fill in as the task runs. They're always present, and empty until they have a value.
The Auto Split Task Object
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "print-split",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"mtl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.mtl?Expires=***"
},
"thumbnail_url": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/preview.png?Expires=***",
"texture_urls": [
{
"base_color": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0.png?Expires=***",
"metallic": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_metallic.png?Expires=***",
"normal": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_normal.png?Expires=***",
"roughness": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/texture_0_roughness.png?Expires=***"
}
],
"part_count": 4,
"progress": 100,
"status": "SUCCEEDED",
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000082000,
"task_error": null,
"consumed_credits": 10
}
- 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-split.
- Name
- model_urls
- Type
- object
- Description
Download URLs for the split model, one per format you requested. A format you didn't request has no key. Formats that support scene objects keep each part as a separate object, and
stlfuses the parts into one solid.- Name
glb- Type
- string
- Description
The GLB file.
- Name
obj- Type
- string
- Description
The OBJ file.
- Name
mtl- Type
- string
- Description
The MTL file. Present with an OBJ file when
keep_textureistrueand the input model is textured.
- Name
fbx- Type
- string
- Description
The FBX file.
- Name
stl- Type
- string
- Description
The STL file, with all parts fused into one solid. To get parts you can select separately, request
3mf.
- Name
usdz- Type
- string
- Description
The USDZ file.
- Name
blend- Type
- string
- Description
The Blender file.
- Name
3mf- Type
- string
- Description
The 3MF file.
- Name
- thumbnail_url
- Type
- string
- Description
Download URL for a preview image of the split model, in the
layoutyou requested. When the parts keep a texture, the preview shows it. Otherwise, each part has its own color.
- Name
- texture_urls
- Type
- array
- Description
The texture maps of the split model, as an array with one object. All parts share these maps. Present only when
keep_textureistrueand the input model is textured.- Name
base_color- Type
- string
- Description
Download URL for the base color map.
- Name
metallic- Type
- string
- Description
Download URL for the metallic map. Absent when the input has no metallic map.
- Name
normal- Type
- string
- Description
Download URL for the normal map. Absent when the input has no normal map.
- Name
roughness- Type
- string
- Description
Download URL for the roughness map. Absent when the input has no roughness map.
- Name
- alpha_thumbnail_url
- Type
- string
- Description
Download URL for a version of
thumbnail_urlwith a transparent background (RGBA). Present only after the task succeeds, when Meshy rendered the transparent preview.
- Name
- prompt_ignored
- Type
- boolean
- Description
Whether Meshy ignored the prompt. It's
truewhen thepromptof aby_partsorby_colorrequest named no parts, so Meshy split the model automatically instead. The part names in the result are then Meshy's, not yours. Present fromPENDINGon. Meshy leaves it out forautotasks and whenever it followed the prompt.
- Name
- part_count
- Type
- integer
- Description
The number of printable parts the split produced. Formats that support scene objects hold one object per part.
stlfuses the parts into one solid, butpart_countstill counts them. Before export, Meshy removes collapsed slivers that can't become a printable part, and doesn't count them.
- Name
- progress
- Type
- integer
- Description
How much of the task is done, as a percentage. It's
0until the task starts and100when it succeeds.
- Name
- status
- Type
- string
- Description
The task status, one of
PENDING,IN_PROGRESS,SUCCEEDED,FAILED, orCANCELED.
- 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
0until the task starts.
- Name
- finished_at
- Type
- timestamp
- Description
Time the task finished, in Unix milliseconds. It's
0until the task finishes.
- Name
- expires_at
- Type
- timestamp
- Description
Time the task's result expires, in Unix milliseconds. It's
0until the task finishes.
- Name
- task_error
- Type
- object
- Description
The error details when the task fails. See Errors.
If a safety check declines the input model, the task fails with
task_error.typeset toinvalid_inputandtask_error.codeset toprovider_content_refused. Send a different model. See Errors.With
keep_texture: true, if Meshy can't keep the texture, the task fails withtask_error.codeset totextured_split_refused. See Errors.
- Name
- consumed_credits
- Type
- integer
- Description
The number of credits the task used. It's always present. It's
10after Meshy accepts the task, and0for aFAILEDtask, because Meshy refunds the credits when a task fails. Deleting aPENDINGtask also refunds it.