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

---

# Errors

Find out why a request or a task failed, and what to do next. A request can fail right away with an HTTP error, and a task can fail later with a `task_error`.

> **Note:** Moving from v1? The main changes for errors:
>   * A request error is the same object as a failed task's `task_error`, with a `code` to branch on.
>   * HTTP status codes don't change, and `message` is still there, but many messages are more specific. If your code matches `message` text, branch on `code` instead.
>   * Some requests that worked on v1 return `400`, for example one with a parameter the endpoint doesn't define.
>
>   See [Errors in the migration reference](/api/migrate-to-v2/reference#errors).

---

## Request errors
Meshy returns these errors right away, when it rejects a request. Every error has the same four fields, whatever the status. Branch on `code` or `type`, not on `message`.

### Response format

  - `type` · *string*

  The error category. It's never `null`. The type tells you what to do next, whatever the status. See [Error types](#error-types).

  - `code` · *string*

  The specific problem. It's never `null`. See [Request error codes](#request-error-codes). Meshy never renames or reuses a code. Meshy may add codes, so handle a code you don't recognize by its `type`.

  - `message` · *string*

  A description of the error that you can show to people. Don't branch on it, because the wording can change.

  - `doc_url` · *string | null*

  A link to the docs that explain the fix, when it needs more than `message` can hold. For example, `pending_task_limit_reached` links the queue limit of each plan, and `moderation_blocked` links its entry below. `null` when `message` already says what to change.

When several parameters are wrong, `code` describes the first problem and `message` lists them all.

Text to 3D errors use this object too. The exception is a request Meshy rejects before it reads the API key, for example because the key is missing or invalid. That error is `{"message": "..."}`.

After a [stream](https://docs.meshy.ai/api/v2/tasks.md#stream-a-task) opens, its HTTP status stays `200`. An `error` event on the stream has the same four fields, plus `status_code`, the status the request would have had.

### Status codes

  - `2xx`

  Success.

- `200 - OK`

  The request worked. Reads and deletes return `200`.

- `202 - Accepted`

  Meshy created the task, and the task runs in the background. Every create returns `202` with the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object).

  - `4xx`

  Something is wrong with the request. Fix it before you send it again.

- `400 - Bad Request`

  A parameter is missing, unknown, malformed, or not allowed with another one. `code` names the kind of problem, for example `parameter_missing` or `parameters_conflict`, and `message` names the parameter. Each endpoint page lists its own `400` errors.

- `401 - Unauthorized`

  The API key is missing (`api_key_missing`) or isn't valid (`api_key_invalid`). See [Authentication](/api/authentication).

- `402 - Payment Required`

  Your account can't pay for the task (`insufficient_credits`), or it reached a credit limit (`credit_limit_reached`). On the free plan, most create requests return `402` with `plan_upgrade_required`.

- `403 - Forbidden`

  You aren't allowed to make this request. For example, the request came from an address outside the API key's IP allowlist (`ip_not_authorized`), or content moderation blocked the input or a task's files (a `moderation_blocked` code). It's also returned when the API key's team member is no longer active on the team, or the account is banned.

- `404 - Not Found`

  The task or route doesn't exist. `task_not_found` means no task with this ID belongs to your account.

`route_not_found` means the path or method doesn't exist on v2, for example `GET /openapi/v2/image-to-3d/{id}`. Check the path and method on the endpoint page. To read a task, use `GET /openapi/v2/tasks/{id}`.

- `409 - Conflict`

  The task's state doesn't allow the operation (`task_in_progress`). For example, deleting an `IN_PROGRESS` task returns `409`, because Meshy can't refund a task that a worker has started. Wait for a final status, then delete the task.

- `422 - Unprocessable Entity`

  The request is valid, but Meshy can't process its input. For example, [Rigging](https://docs.meshy.ai/api/v2/rigging.md) can return `422` with `model_not_riggable` when it can't find a humanoid body in the model.

- `429 - Too Many Requests`

  One of these limits was reached:
* You sent more requests than your rate limit allows (`rate_limit_exceeded`). Wait the number of seconds in the `Retry-After` header, then retry. See [Rate limits](https://docs.meshy.ai/api/v2/rate-limits.md).
* Too many of your tasks are queued or running (`pending_task_limit_reached`). 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 (`concurrent_task_limit_reached`). Wait for a task to finish, or top up.

  - `5xx`

  Something went wrong on Meshy's side. Retry with backoff. If the error continues, check the [status page](https://status.meshy.ai) and contact us on [Discord](https://discord.com/invite/KgD5yVM9Y4).

**400 Bad Request**

```json
{
  "type": "invalid_input",
  "code": "parameters_conflict",
  "message": "texture_prompt and texture_image_url are mutually exclusive",
  "doc_url": null
}
```

**404 Not Found**

```json
{
  "type": "not_found",
  "code": "route_not_found",
  "message": "NoMatchingRoute: Please double check the path and method",
  "doc_url": null
}
```

**403 Forbidden**

```json
{
  "type": "invalid_input",
  "code": "moderation_blocked_nsfw",
  "message": "This content can't be generated because it may not comply with our Acceptable Use Policy regarding NSFW.",
  "doc_url": "https://docs.meshy.ai/en/api/v2/errors#moderation-blocked"
}
```

---

## Request error codes
Every request error has one of these codes. The Status column shows the HTTP status that comes with each code. A few codes come with more than one status, because some endpoints answer the same problem with a different status.

`type` follows the code, not the status. For example, the free-plan refusal is a `402` with the type `permission_denied`.

| `code` | `type` | Status | What it means | What to do |
| --- | --- | --- | --- | --- |
| `request_body_invalid` | `invalid_input` | 400 | The body is empty, isn't valid JSON, or isn't a JSON object. | Send a JSON object. |
| `parameter_missing` | `invalid_input` | 400 | A required parameter is missing, for example `texture_model` on a request for a textured model. Or the request has none of a set of alternatives, for example `input_task_id` or `model_url`. | Add the parameter that `message` names. |
| `parameter_unknown` | `invalid_input` | 400 | The request has a parameter the endpoint doesn't define, for example the misspelled `texure_prompt` or the v1 parameter `hd_texture`. Text to 3D requests with `mode` ignore it instead. | Remove the parameter, or send the one that `message` names. |
| `parameter_invalid_type` | `invalid_input` | 400 | A parameter has the wrong JSON type, for example a string where a number goes. | Send the type the endpoint page lists. |
| `parameter_invalid_value` | `invalid_input` | 400 | A parameter's value isn't one the endpoint accepts, for example an unknown `ai_model`. | Send one of the documented values. |
| `parameter_out_of_range` | `invalid_input` | 400 | A number, length, or count is outside its allowed range. | Send a value within the limits on the endpoint page. |
| `parameters_conflict` | `invalid_input` | 400 | Two parameters can't be used together, or one needs another. For example, `texture_model: "meshy-n1"` can't make PBR maps, so it returns this code with `enable_pbr: true`. | Drop one of them, or add the one it needs. |
| `input_task_not_found` | `invalid_input` | 400, 404 | The task in `input_task_id`, `preview_task_id`, or `rig_task_id` doesn't exist or belongs to another account. | Check the ID. |
| `input_task_not_ready` | `invalid_input` | 400 | The referenced task hasn't succeeded yet. | Wait until it's `SUCCEEDED`, then send the request again. |
| `input_task_expired` | `invalid_input` | 400, 404 | Meshy removed the referenced task's files after the [retention period](https://docs.meshy.ai/api/v2/asset-retention.md). | Create the input task again. |
| `input_task_unsupported` | `invalid_input` | 400, 403, 404 | The referenced task is a kind this endpoint can't use. | Use a task of a type the endpoint page lists. |
| `input_download_failed` | `invalid_input` | 400 | Meshy couldn't download a URL in the request. | Make the URL publicly readable, or send the file as a data URI. A Meshy download URL stops working at its task's `expires_at`. Send the task's `id` where the endpoint takes an input task, or your own copy of the file. |
| `input_file_invalid` | `invalid_input` | 400, 422 | Meshy received a file but can't use it, for example because the file is empty, corrupt, too large, or in an unsupported format. | Send a file in a format and size the endpoint supports. |
| `metadata_invalid` | `invalid_input` | 400 | The `X-Meshy-Metadata` header is malformed, or has more than 64 pairs or 8,192 bytes. | Fix the header. See [Metadata](https://docs.meshy.ai/api/v2/metadata.md). |
| `model_not_available` | `invalid_input` | 400 | The `ai_model` is retired or isn't offered on this endpoint. | Use a model the endpoint page lists. |
| `model_not_riggable` | `invalid_input` | 422 | Rigging couldn't find a humanoid body in the model, or can't rig it automatically. | Use a single humanoid character in a T-pose or A-pose, facing the +Z axis. |
| `moderation_blocked` | `invalid_input` | 400, 403 | Content moderation blocked the input. | Change the prompt or images. See [`moderation_blocked`](#moderation-blocked). |
| `moderation_blocked_nsfw`, `moderation_blocked_ip`, `moderation_blocked_public_figure` | `invalid_input` | 403 | Content moderation blocked the input, and the code names the check. | Change the prompt or images. |
| `moderation_blocked_ip_filtering` | `invalid_input` | 403 | Your organization's IP filtering blocked the input or a task's files. | Change the input, or ask your organization's administrator about its IP whitelist. |
| `request_invalid` | `invalid_input` | 400 | The request is invalid and no more specific code applies. | Read `message`, fix the request, and send it again. |
| `api_key_missing` | `authentication_error` | 401 | The request has no API key. | Send `Authorization: Bearer <your API key>`. See [Authentication](/api/authentication). |
| `api_key_invalid` | `authentication_error` | 401, 404 | The API key isn't valid or was revoked. A `404` means the key's account no longer exists, or the API key selected in the API Playground doesn't exist. | Check the key, or create a new one. |
| `insufficient_credits` | `insufficient_credits` | 402 | Your account doesn't have enough credits for the task. | Top up, then send the request again. |
| `credit_limit_reached` | `insufficient_credits` | 402 | A member, workspace, or API key credit limit was reached. | Raise the limit, or wait until it resets. |
| `plan_upgrade_required` | `permission_denied` | 402, 403 | Your plan doesn't include this request, for example creating tasks on the free plan. | Upgrade your plan. |
| `ip_not_authorized` | `permission_denied` | 403 | The request came from an address outside the API key's IP allowlist. `message` names the address. | Add the address to the allowlist, or send the request from an allowed address. |
| `team_access_denied` | `permission_denied` | 403 | Your account isn't a member of the team the request names. | Check the team, or use a key from that team. |
| `access_denied` | `permission_denied` | 403 | You can't make this request, and no more specific code applies. | Read `message`. Contact support if you think it's wrong. |
| `task_not_found` | `not_found` | 404 | The task doesn't exist, belongs to another account, was deleted, or was removed after its retention period. | Check the ID. |
| `route_not_found` | `not_found` | 404 | The path or method doesn't exist on v2, for example `GET /openapi/v2/image-to-3d/{id}`. | Check the path and method on the endpoint page. To read a task, use `GET /openapi/v2/tasks/{id}`. |
| `task_in_progress` | `conflict` | 409 | The task's state doesn't allow the operation, for example deleting an `IN_PROGRESS` task. | Wait for a final status, then try again. |
| `rate_limit_exceeded` | `rate_limited` | 429 | You sent more requests than your rate limit allows. | Wait the number of seconds in `Retry-After`. See [Rate limits](https://docs.meshy.ai/api/v2/rate-limits.md). |
| `pending_task_limit_reached` | `rate_limited` | 429 | Too many of your tasks are queued or running. | Wait for some to finish. |
| `concurrent_task_limit_reached` | `rate_limited` | 429 | 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 top up. |
| `internal_error` | `server_error` | 500 | Something went wrong on Meshy's side. | Retry with backoff. If it continues, contact support. |
| `service_unavailable` | `service_unavailable` | 503, 502, 504, 422 | The service or one it depends on is temporarily unavailable, for example during maintenance. Rigging returns `422` when its pose estimation service fails. | Retry later. |

### `input_download_failed`
Meshy couldn't download a URL in the request, such as `image_url` or `model_url`. `message` says why, for example the HTTP status the host returned or that the download timed out.

Common causes:

- **The URL has expired.** A signed URL stops working when its signature expires. Meshy's own result URLs stop working at the task's `expires_at`. To use a task's output as input, send the task's `id` where the endpoint takes `input_task_id`. See [Asset retention](https://docs.meshy.ai/api/v2/asset-retention.md).
- **The URL isn't public.** Meshy downloads it without cookies or credentials. A URL behind a login, or one only your own network can reach, fails.
- **The value isn't an `http(s)` URL.** Send an `http(s)` URL, or a data URI where the endpoint takes one.

To skip the download, send the file as a data URI, such as `data:image/png;base64,...`. Each endpoint page says which parameters take one.

---

## Task errors
A task that Meshy created can still fail while it runs. Its `status` becomes `FAILED`, Meshy refunds its credits, and `task_error` explains why. `task_error` is `null` for every other status.

A failed task's `task_error` always has these four fields:

  - `type` · *string*

  The error category. It's never `null`. Branch on it to decide whether to retry. See [Error types](#error-types).

  - `code` · *string | null*

  A specific, documented problem you can act on. See [Error codes](#error-codes). Meshy may add codes, so handle a code you don't recognize by its `type`, as you would a `null` code.

  `null` for errors that have no public code:
  * Every `service_unavailable` error
  * Most `server_error` errors
  * Some `invalid_input` errors, for example an image with no clear subject

  - `message` · *string*

  A description of the error that you can show to people. Don't branch on it, because the wording can change.

  - `doc_url` · *string | null*

  A link to the code's entry in the error reference, for example `https://docs.meshy.ai/en/api/v2/errors#timeout`. Each code has an entry under the same anchor on this page. `null` when `code` is `null`.

**A failed task with a code**

```json
{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "convert",
  "status": "FAILED",
  "consumed_credits": 0,
  "task_error": {
    "type": "invalid_input",
    "code": "invalid_input",
    "message": "No valid objects found in uploaded model. The file may be empty or contain no importable geometry.",
    "doc_url": "https://docs.meshy.ai/en/api/v2/errors#invalid-input"
  },
  "output": null
}
```

**A failed task without a code**

```json
{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "rig",
  "status": "FAILED",
  "consumed_credits": 0,
  "task_error": {
    "type": "service_unavailable",
    "code": null,
    "message": "The service is temporarily unavailable. Please retry in a few minutes.",
    "doc_url": null
  },
  "output": null
}
```

These examples show only part of each task object. For every field, see [the task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object).

---

## Error types
`type` is one of the following values, on a request error and on a failed task's `task_error`. Use it to decide what to do next.

A failed task uses only these types:

- `invalid_input`
- `timeout`
- `service_unavailable`
- `server_error`

  - `invalid_input`

  Something is wrong with the input you sent. Read `code` and `message`, fix the input, and create a new task. Sending the same input again fails the same way.

  - `timeout`

  The task ran past a server-side time limit, for processing or for waiting in the queue. This is often temporary. Create the task again, and if it keeps failing, try a simpler input.

  - `service_unavailable`

  The service was temporarily unavailable. Wait a moment, then create the task again.

  - `server_error`

  Something went wrong on Meshy's side. Retry the request, or create the task again. If it keeps failing, contact support with the task ID.

  - `authentication_error`

  The API key is missing or isn't valid. Fix the key. Sending the same request again fails the same way.

  - `insufficient_credits`

  Your account doesn't have enough credits for the task, or it reached a credit limit. Top up or raise the limit, then send the request again.

  - `permission_denied`

  Your plan, your API key's IP allowlist, or your team membership doesn't allow the request.

  - `not_found`

  The task doesn't exist for your account, or the route doesn't exist. Check the ID or the path.

  - `conflict`

  The task's state doesn't allow the operation yet. Wait for the state to change, then try again.

  - `rate_limited`

  You sent too many requests, or too many of your tasks are queued or running. Wait, then send the request again. When `Retry-After` is set, wait that many seconds.

---

## Error codes
When `code` isn't `null`, it names one of the following problems. Some codes are more specific than their entry, and their `doc_url` links to that entry. For example, [`moderation_blocked`](#moderation-blocked) covers `moderation_blocked_nsfw`.

### `image_too_complex`
Type: `invalid_input`. The input image or prompt describes a subject that is too geometrically complex for 3D generation.

For example:

- Dense piles of small objects, such as a crate full of fruit or a stack of books
- Intricate repeating patterns, such as lattice structures, scaffolding, or wire meshes
- Complex buildings, such as multi-story buildings with many windows and balconies
- Several distinct objects in one image, instead of a single subject

These inputs are likely too complex:

  ![A crate of mixed berries](/images/errors/bad_01_berry_crate.png)
  ![An intricate cathedral ceiling](/images/errors/bad_02_fractal_cathedral.png)
  ![A building under construction with scaffolding](/images/errors/bad_03_construction_building.png)
  ![A honeycomb lattice sphere](/images/errors/bad_04_honeycomb_sphere.png)

To fix it, try one or more of the following:

- Use one object per image. Meshy works best with one clear subject.
- Simplify your subject. For example, use a simple vase instead of a vase filled with dozens of flowers.
- Avoid scenes. Whole buildings, city blocks, furnished rooms, and landscapes are likely to be too much. Focus on a single object.
- Avoid dense repeating structures. Scaffolding, wire meshes, lattices, and piles of small items are common triggers.

### `model_missing_uv`
Type: `invalid_input`. The model has no UV coordinates, and the request asked Meshy to keep the model's own UVs. UV coordinates define how a 2D texture wraps onto the 3D surface.

![No UVs vs Good UVs](/images/errors/uv_missing_vs_good.png)

To fix it, do one of the following:

- To keep your own UV layout, for example for custom seam placement, add UVs to the model in your 3D software and upload it again. STL files can't store UVs, so use GLB, FBX, or OBJ.
- If you don't need your own layout, let Meshy create the UVs. On [Retexture](https://docs.meshy.ai/api/v2/retexture.md), use `uv_mode: "auto"` (the default) or `"regenerate"`.

### `model_insufficient_uv`
Type: `invalid_input`. The model has UV coordinates, but they cover too little of the UV space to texture well. This often happens with models whose exporter wrote placeholder or collapsed UVs.

On [Retexture](https://docs.meshy.ai/api/v2/retexture.md), you get this error with `uv_mode: "preserve"`, which keeps the model's UVs and never replaces them.

![Insufficient UVs vs Good UVs](/images/errors/uv_insufficient_vs_good.png)

To fix it, do one of the following:

- To keep your own UV layout, unwrap the model's UVs again in your 3D software. Spread the islands across the UV space instead of a small corner of it.
- If you don't need your own layout, use `uv_mode: "auto"` (the default), which unwraps the model again when its UVs are too sparse, or `"regenerate"`, which always does. You lose your seam placement, but the new UVs cover enough space to texture.

### `model_missing_texture`
Type: `invalid_input`. A [Multi-Color Print](https://docs.meshy.ai/api/v2/multi-color-print.md) task's input model has no color that Meshy can split into print colors. Meshy builds a multi-color 3MF from the model's colors, so a plain white mesh has nothing to work with. For example, a model generated with `should_texture: false` has no color, and neither does the output of Repair Printability, or an Auto Split task that didn't keep the texture.

What counts as color depends on the `style` you requested:

- `realistic` samples the base color texture through the model's UVs. It needs a single base color texture, and UVs on every mesh part.
- `cartoon` flattens colors per face. It accepts a base color texture on any part, or per-vertex colors (`COLOR_0`).

A model with neither a base color texture nor vertex colors fails with both styles.

Meshy refuses most of these requests before it creates the task, with a `400` and the same explanation. You get this code only when Meshy can't check the input up front. For example, Meshy checks an `.fbx` upload only after the task converts it.

To fix it, use the option that fits your model:

- Texture the model first. Run [Retexture](https://docs.meshy.ai/api/v2/retexture.md) on it, or generate it with `should_texture: true` on [Text to 3D](https://docs.meshy.ai/api/v2/text-to-3d.md) or [Image to 3D](https://docs.meshy.ai/api/v2/image-to-3d.md). Then send that task as `input_task_id`.
- For a vertex-colored model, such as a photogrammetry scan or a hand-painted mesh, use `style: "cartoon"`, which reads `COLOR_0`.
- For a partly textured or multi-texture model with `realistic`, give every mesh part UVs and the same single base color texture. To do that, texture the remaining parts, or merge the textures into one atlas. You can also switch to `style: "cartoon"`.

### `textured_split_refused`
Type: `invalid_input`. An [Auto Split](https://docs.meshy.ai/api/v2/auto-split.md) task with `keep_texture: true` can't keep the input model's texture on the parts. For example, the model has no UVs, or its texture has no room for the new faces the cuts create. Meshy refunds the credits.

To fix it, send the request again without `keep_texture`, or with `keep_texture: false`. The parts then come back with a flat color each.

### `invalid_input`
Type: `invalid_input`. The input failed a check, and no more specific code applies. `message` gives the reason.

For example:

- An empty or corrupted model file
- An unsupported variant of a file format, such as an ASCII FBX file or a meshopt-compressed GLB file
- An uploaded model with no valid 3D objects, for example a file with only armatures, cameras, or lights

The code `provider_content_refused` also links here. It means a model provider's safety check declined the input, for example a prompt, an image, or a model.

To fix it, read `message` for the specific problem. Check that your input files and parameters meet the endpoint's requirements, or change the input. Then create a new task.

### `moderation_blocked`
Type: `invalid_input`. Safety filters rejected your prompt or reference images. The filters check the text and the images together.

`code` can also name the check that blocked the input:

- `moderation_blocked_nsfw`
- `moderation_blocked_ip`
- `moderation_blocked_public_figure`

To catch them all, match codes that start with `moderation_blocked`.

To fix it, do one or both of the following:

- Rephrase the prompt to remove suggestive or sensitive descriptions.
- Change reference images that show content the filters might block.

### `moderation_unavailable`
Type: `server_error`. Content moderation was temporarily unavailable, so Meshy failed the task instead of skipping the check. Nothing is wrong with your content.

To fix it, create the task again.

### `timeout`
Type: `timeout`. The task ran past a server-side processing time limit, so Meshy failed it and refunded its credits. High load, or an input too complex to finish in time, can cause it.

This is different from a timeout in your own code. If your client stopped waiting, the task is still running. See [How long to wait](/api/task-lifecycle#how-long-to-wait).

To fix it, follow these steps:

1. Create the task again. Timeouts are often temporary.
2. If it keeps failing, simplify your input. For inputs that are harder to process, see [`image_too_complex`](#image-too-complex).

### `queue_timeout`
Type: `timeout`. The task waited in the queue too long without starting, so Meshy failed it and returned any credits charged for it. Your input didn't cause this error.

To fix it, create the task again.

### `format_conversion_failed`
Type: `server_error`. Meshy generated the model, but converting it to a format you requested failed.

To fix it, follow these steps:

1. Create the task again.
2. If one format keeps failing, request a different format.

---

## Best practices
1. Branch on `type` and `code`, not on `message`. For a failed task with `timeout`, `service_unavailable`, or `server_error`, create a new task with exponential backoff. For `invalid_input`, fix the input.
2. Don't create a new task when your own request times out. The first task is probably still running, so get it by its ID first. See [How long to wait](/api/task-lifecycle#how-long-to-wait).
3. Log task IDs. Include the ID when you contact support.
4. Check inputs before you send them. Make sure images and models meet the endpoint's format requirements.
5. Call the API from your server. Code that runs in a browser exposes your API key to anyone who opens the page.
