---
title: Errors
description: Understand Pixmato API error responses and common failure categories.
icon: triangle-alert
---

Pixmato returns standard HTTP status codes with JSON error bodies.

## Common statuses

| Status | Meaning                                                     |
| ------ | ----------------------------------------------------------- |
| `400`  | Request body is invalid.                                    |
| `401`  | API key is missing or invalid.                              |
| `403`  | Key cannot access the requested workspace resource.         |
| `404`  | Template, render, or asset was not found.                   |
| `429`  | Too many requests right now, or no render credits remain.   |
| `503`  | Queue delivery is unavailable; inspect the returned job ID. |
| `500`  | Unexpected server or renderer failure.                      |

## Error body

Every error response is JSON with the same fields:

```json
{
  "code": "template_not_found",
  "error": "Template not found in this workspace. Check the template ID, and that the API key belongs to the workspace that owns the template.",
  "status": 404
}
```

- `code` is stable. Use it in your code to decide what to do.
- `error` is a plain sentence that says what happened and what to change. Show it to a person or log it; do not match on its text, which may be improved over time.
- `details` is present when there is more to say, such as each field that failed validation or the ID of a render that is still running.

## Error codes

| Code                          | Status | What to do                                                                                          |
| ----------------------------- | ------ | --------------------------------------------------------------------------------------------------- |
| `unauthorized`                | `401`  | Send an active workspace API key as `Authorization: Bearer YOUR_API_KEY`.                           |
| `forbidden`                   | `403`  | Ask a workspace owner or admin to make the change.                                                  |
| `invalid_json`                | `400`  | Send the body as a JSON object.                                                                     |
| `invalid_form_data`           | `400`  | Upload files as `multipart/form-data` with a field named `file`.                                    |
| `invalid_request`             | `400`  | Fix the field named in `error`; `details` lists every problem.                                      |
| `invalid_template_parameters` | `400`  | Fix the modification keys or values listed in `details`. `GET /v1/templates/{id}` lists the fields. |
| `asset_url_blocked`           | `400`  | Use a publicly reachable image URL. See below.                                                      |
| `asset_unavailable`           | `400`  | An image could not be loaded. Fix the image URL named in `error`, then send the render again.       |
| `plan_limit`                  | `400`  | Lower `output.scale` or use a smaller template canvas.                                              |
| `not_found`                   | `404`  | Check the ID. Resources from other workspaces are reported as not found.                            |
| `template_not_found`          | `404`  | Check the template ID and that the API key belongs to the template's workspace.                     |
| `template_version_not_found`  | `404`  | Save the template in the editor, then render again.                                                 |
| `conflict`                    | `409`  | Use a different name.                                                                               |
| `payload_too_large`           | `413`  | Keep request bodies under 12 MB and asset uploads under 10 MB.                                      |
| `unsupported_media_type`      | `415`  | Upload PNG, JPEG, WebP, GIF or SVG images.                                                          |
| `credits_unavailable`         | `429`  | Wait for the monthly reset or upgrade the plan.                                                     |
| `rate_limited`                | `429`  | Too many requests in the last minute. Wait the number of seconds in `Retry-After`, then resend.     |
| `too_many_in_progress`        | `429`  | Too many renders are still running. Wait for one to finish, then resend.                            |
| `render_timeout`              | `500`  | The render took too long. Try a smaller scale or faster image hosting.                              |
| `render_failed`               | `500`  | The renderer failed. Send the render again; contact support with the render ID if it keeps failing. |
| `internal_error`              | `500`  | Try again later; contact support if it keeps happening.                                             |
| `queue_unavailable`           | `503`  | The render was accepted and will be queued automatically. Poll `details.poll_url`; do not resend.   |

## Retry guidance

Retry only `render_timeout`, `render_failed`, `internal_error`, `rate_limited` and `too_many_in_progress`, and wait a little before retrying. For the last two, wait the number of seconds in the `Retry-After` header. Fix every other `4xx` error before resending the request. For `queue_unavailable` the render already exists: poll it instead of sending it again, or you will be charged twice. The same applies when a render request returns `202`.

## Too many requests

```json
{
  "code": "rate_limited",
  "error": "This workspace has reached its limit of 60 renders per minute. Try again in 23 seconds. Nothing was charged for this request.",
  "status": 429,
  "details": { "limit": 60, "retry_after": 23 }
}
```

Each workspace can only start a certain number of renders per minute, and only a certain number can be running at the same time. See [Limits](/docs/api-reference/limits#request-limits) for the numbers. When a request goes over either limit, Pixmato answers with status `429` and a `Retry-After` header that holds the number of seconds to wait, for example `Retry-After: 23`.

- `rate_limited` means the workspace has sent too many requests in the last minute.
- `too_many_in_progress` means the workspace already has as many renders running as it is allowed. `Retry-After` is a short estimate; check on the running renders with `GET /v1/renders` if you are not sure.

A refused request does not create a render, does not appear in render history and is not charged. Wait the number of seconds in `Retry-After`, then send the same request again. Limits are counted per workspace, so one workspace reaching its limit does not slow down another. The MCP `render_image` tool returns the same message as its error text.

## Images that cannot be loaded

```json
{
  "code": "asset_unavailable",
  "error": "Image \"hero_photo\" could not be loaded from https://cdn.harborlight.com/team/maya-okafor.jpg: the server responded with HTTP 404. Check that the URL opens in a browser without signing in, or upload the image to your workspace. Nothing was charged.",
  "status": 400,
  "details": { "jobId": "rnd_01JY7R8Q7S2K3B4A5C6D7E8F9G", "poll_url": "/v1/renders/rnd_01JY7R8Q7S2K3B4A5C6D7E8F9G" }
}
```

If an image field points to a URL that returns an error, returns something that is not an image, or uses a host name that does not exist, the render fails with `asset_unavailable` instead of producing an image with a broken picture in it. The render is recorded as `failed` in render history and does not use a render credit.

## Request body is not JSON

```json
{
  "code": "invalid_json",
  "error": "The request body is not valid JSON. Check for missing quotes, commas or brackets, and send it with Content-Type: application/json.",
  "status": 400
}
```

Endpoints that take a JSON body return `400` with the code `invalid_json` when the body is empty, cannot be parsed as JSON, or is valid JSON but not an object (for example an array or a string). No render job is created and no render credit is used. Fix the body and send the request again.

`POST /v1/assets` expects `multipart/form-data` with the image in a field named `file`. Any other body returns `400` with the code `invalid_form_data`.

## Blocked image URLs

```json
{
  "code": "asset_url_blocked",
  "error": "Image \"hero_photo\" could not be loaded: http://10.0.4.12/team.png points to a private or internal network address. Use a publicly reachable http or https URL.",
  "status": 400
}
```

Image URLs must point to the public internet. Pixmato refuses URLs and redirects that reach private networks, loopback addresses, or cloud metadata services, and refuses schemes other than `http` and `https`. Change the image field to a publicly reachable URL or upload the image to your workspace, then send a new request.

## Synchronous wait timeout

A render that takes longer than 30 seconds is not an error. The request stops waiting and returns `202` with the render to poll, the same body an asynchronous request gets:

```json
{
  "id": "job_123",
  "status": "pending",
  "template": "tpl_123",
  "poll_url": "/v1/renders/job_123"
}
```

The render continues. Request `GET /v1/renders/job_123` for the result instead of sending the render again.

Closing the client connection also stops the wait without cancelling the render.

When the renderer itself fails or runs out of time, the error uses `render_failed` or `render_timeout` and does not carry `continues: true`; the render has stopped. Neither the HTTP wait timeout nor a disconnected client is a cancellation request. Pixmato does not send webhooks and does not support idempotency keys yet, so poll the existing render instead of resubmitting after a timeout.
