> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/v2/auto-split, part of the Meshy API v2 docs.
>
> - v2 docs index: https://docs.meshy.ai/api/v2/llms.txt
> - All v2 pages in one file: https://docs.meshy.ai/api/v2/llms-full.txt
> - OpenAPI spec for v2: https://docs.meshy.ai/api/v2/openapi.yaml

---

# Auto Split API

Cut a generated model into parts you can print separately. Meshy chooses the cuts, or cuts along the parts or colors you name, and can add connectors so the printed parts fit back together.

> **Note:** Moving from v1? The request is the same. The main changes for Auto Split:
>   * `model_urls`, `thumbnail_url`, and `part_count` are in `output`.
>   * `prompt_ignored` stays at the top level.
>
>   See [what changed for the other endpoints](/api/migrate-to-v2/reference#other-endpoints).

---

## POST /openapi/v2/print/split -- Create an Auto Split task

Creates an Auto Split task and returns the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object). The task runs in the background. To read its result, see [Get the result](#get-the-result). For how long a task usually takes, see [Processing times](/api/task-lifecycle#processing-times).

With `by_parts` or `by_color`, Meshy reads your prompt before it answers. The create request then usually takes a few seconds longer, and can take up to about a minute. Set your HTTP timeout to allow for that.

### Parameters

  - `input_task_id` · *string* · **required**

  The ID of the task whose model to split. The task must be one of yours, and have the status `SUCCEEDED`. These tasks work:
  * [Image to 3D](https://docs.meshy.ai/api/v2/image-to-3d.md)
  * [Multi-Image to 3D](https://docs.meshy.ai/api/v2/multi-image-to-3d.md)
  * [Text to 3D](https://docs.meshy.ai/api/v2/text-to-3d.md), a preview, refine, or one-call task
  * A [Retexture](https://docs.meshy.ai/api/v2/retexture.md), [Remesh](https://docs.meshy.ai/api/v2/remesh.md), [Convert](https://docs.meshy.ai/api/v2/convert.md), or [Resize](https://docs.meshy.ai/api/v2/resize.md) task of one of the preceding tasks

  The model must be generated with Meshy 6 or Meshy 7, including `meshy-6-lite`. Smart Topology models return `400`. A Retexture, Remesh, Convert, or Resize task made from an uploaded model also returns `400`.

  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`.

  - `mode` · *string* · default: `auto`

  How to divide the model.

  Available values:
  * `auto`: Meshy chooses the cuts.
  * `by_parts`: cuts into the parts you name in `prompt`, for example head, torso, and legs.
  * `by_color`: cuts along the color regions you name in `prompt`. Meshy finds the regions in the image the model was generated from, so the input must come from Image to 3D or Multi-Image to 3D. For Multi-Image to 3D, Meshy uses the first image. Other inputs return `400`.

**Only when `mode` is set:**
  - `prompt` · *string* · **required**

  Required for `by_parts` and `by_color`. The parts to split the model into, in any language, up to 600 characters. Longer text returns `400`, even when `mode` is `auto`.

  Name 1 to 10 parts, for example `head, torso, left arm, right arm, legs`. If the parts you name don't cover the whole model, the rest of it becomes one more part. For example, `the head` splits the head off the rest of the model. That extra part counts toward the limit of 10. A prompt that names more than 10 parts, or asks for no split, returns `400`.

  If Meshy can't find any part in the prompt, it splits the model into the parts it finds in the model's reference image instead. The mode stays the same. Meshy still charges the task, and sets `prompt_ignored: true`. The reference image is your input image. For Text to 3D, it's the image Meshy generated for the model, when there is one.

  If there is no reference image, or Meshy finds fewer than 2 parts in it, the request returns `400` with the message `Could not understand the split description`. Meshy doesn't charge for a request that returns `400`.

  - `target_formats` · *string[]* · default: `["glb"]`

  The file formats to generate. Meshy always returns a GLB file, plus the other formats you list.

  Available values:
  * `glb`
  * `obj`
  * `fbx`
  * `stl`
  * `usdz`
  * `blend`
  * `3mf`

  Any other value returns `400`.

  In a 3MF file, each part is its own object, ready for a slicer. An STL file can't hold separate objects, so Meshy fuses the parts into one solid.

  With `keep_texture: true`, GLB, FBX, USDZ, and Blend files hold the texture, and an OBJ file comes with its `.mtl` file. STL and 3MF files hold geometry only.

  Meshy scales an STL or 3MF file down to at most 150 mm on the longest side. A smaller model keeps its size.

  - `layout` · *string* · default: `assembled`

  How Meshy arranges the parts, in every file and in the preview.

  Available values:
  * `assembled`: the parts stay where they were in the model.
  * `on_plate`: Meshy lays the parts flat and spreads them out on a build plate, ready to slice. In this layout, an OBJ file is Z-up, in millimeters, and also scaled down to at most 150 mm on its longest side.

  - `keep_texture` · *boolean* · default: `false`

  Whether to keep the input model's texture on the parts. `true` gives every part the input's texture, and `output.texture_urls` lists the maps. `false` gives each part a flat 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 with `false`. If Meshy can't keep the texture, the task fails with the error code `textured_split_refused`. See [Errors](https://docs.meshy.ai/api/v2/errors.md#textured-split-refused).

  - `connectors` · *boolean* · default: `false`

  Whether to add mortise-and-tenon connectors at each cut, so the printed parts fit together. `false` splits the model without connectors.

  If Meshy can't place the connectors, the split still succeeds without them. The response doesn't say whether Meshy placed them.

**Only when `connectors` is set:**
  - `connector_type` · *string* · default: `cube`

  The connector's shape, `cube` or `cylinder`.

  - `connector_size` · *number* · default: `0.5`

  The connector's size, as a fraction of the widest circle that fits in the cut face, from `0.1` to `0.8`. A value outside this range returns `400`, even when `connectors` is `false`.

  - `connector_height` · *number* · default: `0.1`

  How far the connector sticks out of the cut, in the units of the GLB file, from `0.1` to `0.8`. A value outside this range returns `400`, even when `connectors` is `false`.

### Returns

`202 Accepted` with the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object). The task starts as `PENDING`, with your request in `input` and `output` set to `null`. If Meshy split the model into the parts it found instead of the ones in your prompt, the task also has `prompt_ignored: true`.

Two response headers help you read the task:
* `Location`: the task's URL on [Tasks](https://docs.meshy.ai/api/v2/tasks.md#how-a-task-runs)
* `Retry-After`: how many seconds to wait before you first read it

### Failure modes

  - `400 - Bad Request`

  The request can't run. For example:
  * `input_task_id` is missing.
  * The input task hasn't succeeded, or isn't a supported type (`Input task mode does not support splitting; ...`).
  * The model wasn't generated with Meshy 6 or Meshy 7 (`Auto Split requires a model generated with Meshy 6 or Meshy 7`).
  * `prompt` is missing for `by_parts` or `by_color`.
  * `by_color` was sent for a model that wasn't made from an image. Send `by_parts` or `auto` instead.
  * The prompt names no usable split, for example it asks for one piece or names more than 10 parts. Name the parts to split into, up to 10.

  The error message says which problem it found. See [Errors](https://docs.meshy.ai/api/v2/errors.md#request-errors).

  - `401 - Unauthorized`

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

  - `402 - Payment Required`

  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.

  - `403 - Forbidden`

  One of these applies:
  * Content moderation blocked the prompt. The message is `explicit content` or `prohibited content`. Change the prompt, then retry.
  * `input_task_id` is a bas-relief model, which this endpoint can't split. The message is `This model type does not support this operation`. Send a different model.

  - `404 - Not Found`

  `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](https://docs.meshy.ai/api/v2/asset-retention.md) returns the code `input_task_expired` instead.

  - `429 - Too Many Requests`

  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.
  * You sent more than 12 prompts in a minute with `by_parts` or `by_color`. This limit is per user, and splits you make in the Meshy web app count toward it. Wait a moment, then retry.

  - `503 - Service Unavailable`

  Meshy is too busy to read the prompt. The message is `Prompt parsing is busy right now; retry shortly`. Retry later, or send `mode: "auto"`. Meshy doesn't charge for this response.

**cURL**

```bash
# Let Meshy choose the cuts
curl https://api.meshy.ai/openapi/v2/print/split \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
  }'

# Split into named parts that keep the texture, laid out on a plate with connectors, plus a 3MF
curl https://api.meshy.ai/openapi/v2/print/split \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "mode": "by_parts",
    "prompt": "head, torso, arms, legs",
    "target_formats": ["3mf"],
    "layout": "on_plate",
    "keep_texture": true,
    "connectors": true
  }'
```

```javascript
// Let Meshy choose the cuts
const response = await fetch("https://api.meshy.ai/openapi/v2/print/split", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input_task_id: "018a210d-8ba4-705c-b111-1f1776f7f578",
  }),
});
if (!response.ok) throw new Error(await response.text());
const task = await response.json();
console.log(task.id, task.status);
```

```python
import os
import requests

# Let Meshy choose the cuts
response = requests.post(
    "https://api.meshy.ai/openapi/v2/print/split",
    headers={"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"},
    json={"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"},
)
response.raise_for_status()
task = response.json()
print(task["id"], task["status"])
```

**Response**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "print-split",
  "status": "PENDING",
  "progress": 0,
  "created_at": 1790640079880,
  "started_at": null,
  "finished_at": null,
  "expires_at": null,
  "preceding_tasks": 1,
  "consumed_credits": 10,
  "task_error": null,
  "input": {
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578"
  },
  "output": null
}
```

---

## Get the result
Read Auto Split tasks the same way as every other v2 task, through the [Tasks](https://docs.meshy.ai/api/v2/tasks.md) routes. To list only Auto Split tasks, filter by `type=print-split`.

| To | Call |
| --- | --- |
| Get one task | [`GET /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#get-a-task) |
| Wait for updates | [`GET /openapi/v2/tasks/{id}/stream`](https://docs.meshy.ai/api/v2/tasks.md#stream-a-task) or a [webhook](https://docs.meshy.ai/api/v2/webhooks.md) |
| List your tasks | [`GET /openapi/v2/tasks?type=print-split`](https://docs.meshy.ai/api/v2/tasks.md#list-tasks) |
| Delete a task | [`DELETE /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#delete-a-task) |

---

## Auto Split output
When the task succeeds, `output` holds these fields. The rest of the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object) is the same for every task type. The URLs in `output` stop working at `expires_at`.

  - `model_urls` · *object*

  Signed URLs to the split model, keyed by format. There is always a `glb` key, plus one key for each other format in `target_formats`. An `obj` with a texture also gets an `mtl` key, with the URL of its material file.

  - `thumbnail_url` · *string | null*

  Signed URL to a preview in the `layout` you asked for. It shows the texture when the parts keep one, and gives each part its own color otherwise.

  - `texture_urls` · *array*

  The texture maps that all the parts share, as one item with a signed URL for each of these maps:
  * `base_color`
  * `metallic`
  * `roughness`
  * `normal`

  A map the input doesn't have is `null`. Present only when `keep_texture` is `true` and the input model is textured. Otherwise, each part has a flat color, and the field is absent.

  - `part_count` · *integer | null*

  The number of parts Meshy split the model into. With `by_parts` or `by_color`, this can differ from the number of parts you named, because one name can become several parts, or none.

The task object can also have `prompt_ignored: true` at the top level, from the create response on. Meshy adds it when it split the model into the parts it found instead of the ones in your prompt, and leaves it out otherwise.

If a safety check declines the input model, the task fails with `task_error.type` set to `invalid_input` and `task_error.code` set to `provider_content_refused`. Send a different model. See [Errors](https://docs.meshy.ai/api/v2/errors.md#invalid-input).

With `keep_texture: true`, if Meshy can't keep the texture, the task fails with `task_error.code` set to `textured_split_refused`. See [Errors](https://docs.meshy.ai/api/v2/errors.md#textured-split-refused).

**Succeeded Auto Split task**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "print-split",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640079887,
  "finished_at": 1790640152916,
  "expires_at": 1790899352916,
  "preceding_tasks": 0,
  "consumed_credits": 10,
  "task_error": null,
  "input": {
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "keep_texture": true
  },
  "output": {
    "model_urls": {
      "glb": "https://assets.meshy.ai/***/output/model.glb?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/output/preview.png?Expires=***",
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/output/texture_0.png?Expires=***",
        "metallic": "https://assets.meshy.ai/***/output/texture_0_metallic.png?Expires=***",
        "roughness": "https://assets.meshy.ai/***/output/texture_0_roughness.png?Expires=***",
        "normal": "https://assets.meshy.ai/***/output/texture_0_normal.png?Expires=***"
      }
    ],
    "part_count": 6
  }
}
```
