> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/v2/multi-color-print, 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

---

# Multi-Color Print API

Turn a textured 3D model into a multi-color 3MF file. Meshy reduces the model's colors to a filament palette and adds a slicer preset for your printer brand.

> **Note:** Moving from v1? The request is the same. The main changes for Multi-Color Print:
>   * The 3MF file follows the v2 [model size](/api/migrate-to-v2/reference#model-size) rules.
>   * The 3MF URL is in `output.model_urls` instead of the top-level `model_urls`.
>   * The empty fields v1 returned are gone.
>
>   See [what changed for the other endpoints](/api/migrate-to-v2/reference#other-endpoints).

---

## POST /openapi/v2/print/multi-color -- Create a Multi-Color Print task

Creates a Multi-Color Print 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).

The model must have color. The `realistic` style needs a base color texture, and the `cartoon` style also accepts vertex colors. Meshy checks most models when you create the task, and a model without the color that `style` needs returns `400`. Some models can only be checked while the task runs, for example an FBX upload, and the task fails instead. To add color, texture the model first, for example with [Retexture](https://docs.meshy.ai/api/v2/retexture.md).

The 3MF file has its origin at the bottom. For a model Meshy generated, Meshy scales the file down to at most 150 mm on the longest side. Uploaded and resized models keep their own size. See [Model size](/api/migrate-to-v2/reference#model-size).

### Parameters

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

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

  Multi-Color Print reads the task's GLB file, which can have at most 8,000,000 faces. A model with more faces returns `400`. In that case, run a [Remesh](https://docs.meshy.ai/api/v2/remesh.md) task on it first, and send the Remesh task's `id` instead.

  - `model_url` · *string* · **required**

  Required unless you send `input_task_id`. The model to print, 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 or FBX file of at most 400 MB. A data URI must hold a GLB file of at most 100 MB. A larger file returns `400`.

  A file over 100 MB can have at most 8,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 file must not use Draco compression. A file that breaks these rules returns `400`.

  - `max_colors` · *integer* · default: `4`

  The maximum number of colors in the printed model, from `1` to `16`. A negative value or one over `16` returns `400`. To use the default, leave it out rather than sending `0`.

  - `style` · *string* · default: `realistic`

  How Meshy places colors on the model.

  Available values:
  * `realistic`: samples the texture for fine detail, and makes a larger file. The model needs a single base color texture, with UVs on every part.
  * `cartoon`: makes flat, uniform color regions, and a smaller file. It also works with vertex colors.

  - `max_depth` · *integer* · default: `4`

  How finely Meshy samples the texture onto the mesh, from `3` to `6`. Any other value returns `400`, except `0`, which is the same as leaving it out. Higher values keep finer color detail, and make a larger file. Only the `realistic` style uses this setting.

  - `printer_brand` · *string* · default: `bambu`

  The printer brand whose slicer preset Meshy saves in the 3MF file, so the file opens with a matching printer, filament, and process profile. The preset uses the brand's default printer, with a 0.4 mm nozzle.

  Available values:
  * `bambu`
  * `anycubic`
  * `creality`
  * `elegoo`
  * `flashforge`
  * `prusa`
  * `qidi`
  * `snapmaker`
  * `ankermake`

  Any other value returns `400`.

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

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:
  * Neither `input_task_id` nor `model_url` was sent (code `parameter_missing`).
  * Both `input_task_id` and `model_url` were sent (code `parameters_conflict`).
  * The input task hasn't succeeded, or wasn't created with the API.
  * The input task's model has more than 8,000,000 faces. Run a Remesh task on it, then send the Remesh task's `id` instead.
  * `model_url` isn't a GLB or FBX file, can't be downloaded, or is too large.
  * 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 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`).
  * The model lacks the color the chosen `style` needs, for example `The input model has no color information ...` or `style=realistic requires ...`. Texture the model first. If the model has vertex colors, you can also switch to the `cartoon` style.

  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`

  `input_task_id` is a bas-relief model, which this endpoint can't print. 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.

**cURL**

```bash
# Make a 3MF with up to 6 colors from a textured model file
curl https://api.meshy.ai/openapi/v2/print/multi-color \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "max_colors": 6
  }'

# Make a cartoon-style 3MF from a Meshy task, for a Prusa printer
curl https://api.meshy.ai/openapi/v2/print/multi-color \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "style": "cartoon",
    "printer_brand": "prusa"
  }'
```

```javascript
// Make a 3MF with up to 6 colors from a textured model file
const response = await fetch("https://api.meshy.ai/openapi/v2/print/multi-color", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model_url: "https://cdn.meshy.ai/model/example_model_2.glb",
    max_colors: 6,
  }),
});
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

# Make a 3MF with up to 6 colors from a textured model file
response = requests.post(
    "https://api.meshy.ai/openapi/v2/print/multi-color",
    headers={"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"},
    json={
        "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
        "max_colors": 6,
    },
)
response.raise_for_status()
task = response.json()
print(task["id"], task["status"])
```

**Response**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "print-multi-color",
  "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": {
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "max_colors": 6
  },
  "output": null
}
```

---

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

| 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-multi-color`](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) |

---

## Multi-Color Print output
When the task succeeds, `output` holds this field. 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 URL to the multi-color model, as one file with the key `3mf`.

Multi-Color Print tasks have no preview image, so `output` has no `thumbnail_url`.

Meshy can check some models for color only while the task runs, for example an FBX upload. If such a model lacks the color that `style` needs, the task fails with `task_error.code` set to `model_missing_texture`. Texture the model first. If the model has vertex colors, you can also switch to the `cartoon` style. See [Errors](https://docs.meshy.ai/api/v2/errors.md#model-missing-texture).

**Succeeded Multi-Color Print task**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "print-multi-color",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640079887,
  "finished_at": 1790640131532,
  "expires_at": 1790899331532,
  "preceding_tasks": 0,
  "consumed_credits": 10,
  "task_error": null,
  "input": {
    "model_url": "https://cdn.meshy.ai/model/example_model_2.glb",
    "max_colors": 6
  },
  "output": {
    "model_urls": {
      "3mf": "https://assets.meshy.ai/***/output/model.3mf?Expires=***"
    }
  }
}
```
