> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gizmo.antimlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors & troubleshooting

> Handle HTTP errors, generation failures and retries without duplicate work.

Check the HTTP status before reading JSON or saving export bytes. Errors on documented public endpoints use this shape:

```json theme={null}
{
  "detail": {
    "error": {
      "code": "asset_not_found",
      "message": "Asset ASSET_ID not found",
      "status": 404
    }
  }
}
```

Request validation errors return `422` with `detail.error.code: "validation_error"` and an additional `fields` array inside `detail.error`, identifying field locations and messages. Responses include an `X-Request-ID` for support. Errors from an upstream proxy may have a different body; always check HTTP status first.

| Status | Meaning |
| - | - |
| `401` | Missing, invalid, or revoked API key |
| `402` | Insufficient generation credits |
| `403` | Insufficient scope or a currently unavailable Team route; inspect the code |
| `404` | Asset, job, or image not found for your account |
| `409` | Conflicting request or idempotency key; inspect the error code |
| `413` | Image or upload batch exceeds its size limit |
| `415` | Unsupported or invalid image content |
| `422` | Invalid prompt, image URL, export format, or another request field |
| `429` | Rate limit exceeded; retry after the supplied reset time |
| `500` / `503` | Generation setup, export, or service failure |

**Deployment not enabled:** `503 workspace_not_enabled` means Team routing is
not enabled on the server you called. Check the base URL in API Access and contact
support with `X-Request-ID`; a new key or repeated submission will not fix it.

Rate-limited API-key responses include `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (Unix seconds). Honor `Retry-After` on `429` and use exponential backoff with jitter for transient failures. Retry generation with its original idempotency key. Generation uses your account's credits.

See the [OpenAPI specification](https://docs.gizmo.antimlabs.com/openapi.json) for request schemas and the [interactive reference](https://docs.gizmo.antimlabs.com/api-reference/assets/list-assets) to try requests.

## Report a failure

Include the HTTP status, `detail.error.code`, `X-Request-ID`, job or batch ID, and the failed operation. For an accepted job, also include `job.error` and `failure_stage` when available. Do not send API keys or private download URLs. A successful HTTP poll can report a failed job: check both HTTP and job status.

See [Track, cancel & retry](/api-jobs) for safe recovery.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.