# Pixel Art Canvas Image Import

> Pixel Art Canvas Image Import is a paid API for AI agents from pixelart.withzero.xyz, paid per call via MPP, $0.010000/call, status unknown (last checked 2026-10-12, last successful call 2026-07-17).

Converts a PNG, JPEG, or WebP image (via base64 or public URL) into a pixel-art canvas with optional palette quantization and scaling modes

## Facts

- Endpoint: POST https://pixelart.withzero.xyz/api/v1/canvas/import?utm_source=zero.xyz
- Price: $0.010000/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-12
- Last successful call: 2026-07-17
- Success rate: 82% of calls made through Zero
- Rating: 4.3 / 5 from 1 review
- Activations on Zero: 112
- Provider: pixelart.withzero.xyz
- Website: https://pixelart.withzero.xyz
- Canonical page: https://www.zero.xyz/c/pixelart-withzero-xyz-pixel-art-canvas-image-import-413242cc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y0cRwUU3HKuQG2BJH3dfM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pixelart-withzero-xyz-pixel-art-canvas-image-import-413242cc -d '<json body>'
```

Example prompt: Convert this photo into pixel art — use the image at https://example.com/mycat.jpg, make the canvas 64×64 pixels, use smooth Lanczos scaling since it's a photo, fit it with letterboxing (contain), and quantize the palette down to 32 colors.

## When to prefer this

Use this endpoint when you need to create a new pixel art canvas by importing and converting an existing image (photo or existing pixel art) rather than drawing programmatically from scratch. Prefer this over draw-pixels or shape-draw endpoints when the source material is a raster image you want pixelated or resized. Choose nearest scaleMode for existing pixel art (to preserve crisp edges) and smooth for photos being converted to pixel art style.

## Known failure modes

- Image URL is not publicly accessible or returns non-200 — server cannot fetch the image
- Base64 imageData exceeds 2 MB limit — rejected with size error
- imageUrl payload exceeds 5 MB — rejected with size error
- Neither imageData nor imageUrl provided — missing required image source
- Width or height outside allowed range (4–256) — validation error
- colors parameter outside allowed range (2–256) — validation error
- canvasId UUID provided does not match an existing canvas — not found error
- Unsupported image format — only PNG, JPEG, WebP, GIF accepted
- Payment not included or insufficient — endpoint requires $0.01 USDC per call

## How this service works

Convert a public PNG/JPEG/WebP/GIF or base64 image into an editable, palette-quantized pixel canvas. Full agent guide: https://pixelart.withzero.xyz/llms.txt

## Output

Returns a JSON object with the new canvas UUID (id), its actual pixel dimensions (width, height), the number of distinct RGBA colors in the result (colorCount), and a live viewUrl where humans can view or continue editing the pixel art canvas.

## Example request

```json
{
 "fit": "contain",
 "loop": true,
 "name": "Test Pixel Art",
 "width": 64,
 "colors": 16,
 "height": 64,
 "imageData": "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfqBQUQNzggFlbcAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTA1LTA1VDE2OjU1OjU2KzAwOjAwuxoOLQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wNS0wNVQxNjo1NTo1NiswMDowMMpHtpEAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDUtMDVUMTY6NTU6NTYrMDA6MDCdUpdOAAB6RUlEQVR42iT967J13XYQ5rXeWj+Ow5xrve+39xZSsDBEAslGoJgSRkDhuJKUnTgmGDCJY0QZBydxKglF+SpzGU7QPnzfWmvOOcbo59aaf+S5kcf8f375D369MAx/3n5jfxl6hkE4j6/wdmsjfNfcF51fNB59hDB1WysOhrsJOm9nl+dvcPv67jy9V0r6NpYyv6i9oXu8ru+jHN+2ZkKsw9tRZc74oxvS5e12+3PkQ9w4vtnLOfvxMiM2NFckduMvyUV6O/J2lQD4NJ5+dy8/1dOfbyPfbouoQFY6xrEv/oB5Sp3bsm27ioH63d3mtjGJfi7C+X+k63fCm/kLc0pYfyUtqhRvO61jtve32zYqGpbvcJ35J3U/m6fZ7fBv4ALCxC+64ysEUwy+ZLXP7G43M0y55scPv4SxS/LXS2wrv8mOoUd/e8CsP+dQ+H1zH9r0SgPe/FNmhfcf+ld5+/H9SsldHefyDDf6b//1LwIaCiN3Z8dsuVf31Qe16AWGDbB5/fjAdvWe08pukRrBwQIiy9DTiE6nS46Lhr5DeAlFX/GYHh5xmXEMyQtYwmNOFNda8ovM7hEPd+iaNIoRJ8cM3WpsBticIqNdA+D70DUEad8Wl4f10LNEDgIiCDdHbUsjj9U1HKUFr+Kk9hjU7sb2iScY7PCeOwHcaBXvxyg+htEsqw+tcMLwXnsCYrhwnNa5R92Ct4apm7Sibb0b7eyjv71AuTs0S6/pjCOBMktPMoTBv8xp+0gDQle3ajeTk3NQQ776TN96hdgNDk842eYql6aZLDUP09P/61+9S6gweVoAOsbDGhfEwO112FWKv26jVovXkXsaHW5mOSG5hcNEZ+D718vIorGL+OXYmJ1MXK1sX2+Xr2i8NJy9gDZIRK/Qlc1j8+OLXhsTrHJesJuX5durfYizZl5pNQrVmESWdS63e/o4Bydfmx1u3KXk2cdW56C4bI+1m8+Tyy4C6GT37/Wg5k27ajLQH6X7csUlo7em3XleMu1ukn2UHbhol1
… (truncated)
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "example": {
  "width": 64,
  "height": 64,
  "imageUrl": "https://httpbin.org/image/png"
 },
 "required": [
  "width",
  "height",
  "scaleMode",
  "fit",
  "loop"
 ],
 "properties": {
  "fit": {
   "enum": [
    "fill",
    "contain",
    "cover",
    "crop"
   ],
   "type": "string",
   "default": "contain",
   "description": "fill = stretch; contain = letterbox; cover/crop = crop to fill. Default contain."
  },
  "fps": {
   "type": "integer",
   "maximum": 60,
   "minimum": 1,
   "description": "Default playback rate for frames added after import."
  },
  "game": {
   "type": "object",
   "properties": {
    "clips": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "name",
       "fromFrame",
       "toFrame"
      ],
      "properties": {
       "fps": {
        "type": "integer",
        "maximum": 60,
        "minimum": 1
       },
       "loop": {
        "type": "boolean"
       },
       "name": {
        "type": "string",
        "maxLength": 64,
        "minLength": 1
       },
       "toFrame": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       },
       "fromFrame": {
        "type": "integer",
        "maximum": 9007199254740991,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 64,
     "description": "Named animation ranges within this canvas."
    },
    "facing": {
     "enum": [
      "left",
      "right",
      "none"
     ],
     "type": "string",
     "description": "Native facing direction of the authored art."
    },
    "frames": {
     "type": "object",
     "description": "Metadata keyed by canonical zero-based frame index.",
     "propertyNames": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)$"
     },
     "additionalProperties": {
      "type": "object",
      "properties": {
       "boxes": {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "kind",
          "x",
          "y",
          "width",
          "height"
         ],
         "properties": {
          "x": {
           "type": "number"
          },
          "y": {
           "type": "number"
          },
          "kind": {
           "enum": [
            "hit",
            "hurt",
            "collision",
            "interaction"
           ],
           "type": "string"
         
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "id",
  "width",
  "height",
  "viewUrl",
  "apiUrl",
  "ansiUrl",
  "manifestUrl",
  "fullSpecUrl",
  "guideUrl",
  "colorCount"
 ],
 "properties": {
  "id": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "width": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "apiUrl": {
   "type": "string"
  },
  "height": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "ansiUrl": {
   "type": "string",
   "description": "URL that returns ANSI half-block art — pipe via `curl <ansiUrl>` to render in any terminal or agent context."
  },
  "viewUrl": {
   "type": "string"
  },
  "guideUrl": {
   "type": "string",
   "description": "Holistic agent workflow guide."
  },
  "colorCount": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991,
   "description": "Distinct RGBA colors in the imported result."
  },
  "fullSpecUrl": {
   "type": "string",
   "description": "Complete OpenAPI surface including free editing routes."
  },
  "manifestUrl": {
   "type": "string",
   "description": "Engine-ready animation manifest for this mutable canvas."
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pixelart-withzero-xyz-pixel-art-canvas-image-import-413242cc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pixelart.withzero.xyz](https://www.zero.xyz/host/pixelart.withzero.xyz/llms.txt)
