# Create Pixel Art Canvas

> Create Pixel Art Canvas is a paid API for AI agents from pixelart.withzero.xyz, paid per call via MPP, $0.01/call, status unknown (last checked 2026-09-16).

Creates a new blank (or pre-loaded) pixel art canvas and returns a UUID canvas ID plus a live interactive editor URL for use with subsequent draw, fill, and export endpoints.

## Facts

- Endpoint: POST https://pixelart.withzero.xyz/api/v1/canvas
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Provider: pixelart.withzero.xyz
- Website: https://pixelart.withzero.xyz
- Canonical page: https://www.zero.xyz/c/pixelart-withzero-xyz-create-pixel-art-canvas-e3bff145
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XaVA5zKl8UUddGMFJf5LE

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-create-pixel-art-canvas-e3bff145 -d '<json body>'
```

Example prompt: Create a new 64x64 pixel art canvas called 'SpaceShip Sprite' so I can start drawing on it programmatically — I want a blank transparent canvas and the editor link to share.

## When to prefer this

Use this endpoint as the mandatory first step whenever you need to create a new pixel art canvas from scratch. It is the entry point for the entire pixel art workflow — you must call this before any draw, fill, shape, or export operations. Choose this over the image-to-pixel-art conversion endpoint when you want a blank canvas rather than converting an existing image.

## Known failure modes

- Width or height out of range (must be 8–256): returns 400 with validation error
- initData length mismatch — base64-decoded bytes do not equal width × height × 4: returns 400
- initData is not valid base64: returns 400 with parse error
- Name exceeds 100 characters: returns 400
- Service unavailable or internal error: returns 5xx

## How this service works

Create a new pixel art canvas. Returns editing, manifest, full-spec, guide, and interactive-view URLs. Optionally pre-load base64 RGBA pixels. Full agent guide: https://pixelart.withzero.xyz/llms.txt

## Output

Returns a JSON object containing: a UUID canvas ID (used in all subsequent draw, fill, shape, and export API calls), the canvas dimensions (width and height), a viewUrl pointing to the interactive live editor pre-loaded with this canvas, an apiUrl as the base for further API operations on this canvas, and an ansiUrl for rendering the canvas as ANSI half-block art in a terminal or agent context.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "loop"
 ],
 "properties": {
  "fps": {
   "type": "integer",
   "maximum": 60,
   "minimum": 1,
   "description": "Playback rate for animation consumers."
  },
  "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"
          },
          "name": {
           "type": "string",
           "maxLength": 64,
           "minLength": 1
          },
          "width": {
           "type": "number",
           "exclusiveMinimum": 0
          },
          "height": {
           "type": "number",
           "exclusiveMinimum": 0
          }
         },
         "additionalProperties": false
        },
        "maxIte
… (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"
 ],
 "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)$",
   "description": "Canvas UUID — use in all subsequent API calls."
  },
  "width": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "apiUrl": {
   "type": "string",
   "description": "Base API URL for this canvas."
  },
  "height": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": -9007199254740991
  },
  "ansiUrl": {
   "type": "string",
   "description": "URL that returns ANSI half-block art of the canvas. Pipe via `curl <ansiUrl>` to render in any terminal or agent context."
  },
  "viewUrl": {
   "type": "string",
   "description": "URL to the interactive pixel editor pre-loaded with this canvas."
  },
  "guideUrl": {
   "type": "string",
   "description": "Holistic agent workflow guide."
  },
  "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-create-pixel-art-canvas-e3bff145/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)
