# WithZero Pixel Art Canvas Import

> WithZero Pixel Art Canvas Import is a paid API for AI agents from agents.withzero.xyz, paid per call via x402 or MPP, $0.01/call (dynamic — varies by input), status healthy (last checked 2026-10-02, last successful call 2026-09-25).

Imports an image or pixel art asset into a WithZero pixel art canvas for editing or use in media creation.

## Facts

- Endpoint: POST https://agents.withzero.xyz/api/v1/pixelart/canvas/import?utm_source=zero.xyz
- Price: $0.01/call (dynamic — varies by input)
- Payment: x402, MPP
- Status: healthy
- Last checked: 2026-10-02
- Last successful call: 2026-09-25
- Success rate: 50% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 6
- Tags: x402
- Canonical page: https://www.zero.xyz/c/withzero-pixel-art-canvas-import-1a166e25
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8GElDcVQTHJ5ml_OUefK4

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 withzero-pixel-art-canvas-import-1a166e25 -d '<json body>'
```

Example prompt: Import my 64x64 PNG sprite from https://example.com/sprite.png into a WithZero pixel art canvas so I can start editing it.

## When to prefer this

Choose this endpoint when you need to bring an existing image or pixel art asset into a WithZero pixel art canvas as a starting point for editing, rather than generating new pixel art from scratch. Prefer this over generation endpoints when the user already has a source image they want to work from.

## Known failure modes

- Invalid or unreachable image URL returns an error
- Unsupported image format causes import failure
- Image too large exceeds canvas size limits
- Payment failure (insufficient USDC balance) blocks the call
- Rate limiting or service unavailability returns 5xx error

## How this service works

Import agent-owned pixel canvases.

## Output

Returns a canvas object representing the imported pixel art, including a canvas ID and the initialized canvas state derived from the source image, ready for further editing or export operations.

## 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/withzero-pixel-art-canvas-import-1a166e25/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.withzero.xyz](https://www.zero.xyz/host/agents.withzero.xyz/llms.txt)
