# Canvas Pixel Region Purchase

> Canvas Pixel Region Purchase is a paid API for AI agents from canvas.0000402.xyz, paid per call via x402, $1/call, status unknown (last checked 2026-10-11).

Purchase a rectangular pixel region on a shared canvas by paying $0.01/pixel, returning a region ID and owner token for future content updates.

## Facts

- Endpoint: POST https://canvas.0000402.xyz/buy?utm_source=zero.xyz
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Success rate: 0% of calls made through Zero
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/canvas-0000402-xyz-13229def
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YhBy1FHaikq9Xi3RdHoQd

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 canvas-0000402-xyz-13229def -d '<json body>'
```

Example prompt: Buy me a 50x50 pixel region on the shared canvas starting at position x=100, y=200 — I want to own that spot and get the owner token so I can update it later.

## When to prefer this

Use this endpoint when an agent needs to claim and own a specific or auto-placed rectangular region on the shared pixel canvas, particularly when the user wants persistent ownership (via owner_token) to update content later. Prefer over alternatives when the goal is to permanently reserve canvas space backed by a blockchain payment.

## Known failure modes

- Insufficient USDC balance to cover pixel cost (payment failure)
- Requested region already owned by another user (conflict)
- Coordinates out of canvas bounds (validation error)
- Region dimensions below minimum 10x10 pixel requirement
- Auto-placement fails if no suitable space available on canvas
- Network issues with Base Mainnet transaction

## How this service works

Pay $0.01/pixel to buy a canvas region. Provide x1,y1,x2,y2 for a specific position or width+height for auto-placement. Minimum region: 10×10 pixels. Returns region_id and owner_token. Use owner_token to update content later for free. Network: Base Mainnet. Each request purchases one region and returns placement coordinates plus the owner token.

## Output

Returns a region_id identifying the purchased canvas region, an owner_token for authenticating future free content updates, and the placement coordinates (x1, y1, x2, y2) where the region was placed on the canvas.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "x1": {
   "type": "integer",
   "description": "Left edge pixel, 0–1499. Example: a 10×10 block at top-left uses x1=0. Provide all four of x1,y1,x2,y2 for manual placement; omit all four to use auto-placement instead."
  },
  "x2": {
   "type": "integer",
   "description": "Right edge pixel (exclusive), 10–1500. x2 = x1 + width. Example: a 10×10 block at top-left uses x2=10. Required together with x1,y1,y2 for manual placement."
  },
  "y1": {
   "type": "integer",
   "description": "Top edge pixel, 0–1499. Example: a 10×10 block at top-left uses y1=0. Provide all four of x1,y1,x2,y2 for manual placement; omit all four to use auto-placement instead."
  },
  "y2": {
   "type": "integer",
   "description": "Bottom edge pixel (exclusive), 10–1500. y2 = y1 + height. Example: a 10×10 block at top-left uses y2=10. Required together with x1,y1,x2 for manual placement."
  },
  "color": {
   "type": "string",
   "description": "Hex color e.g. '#ff6b35'. Required."
  },
  "width": {
   "type": "integer",
   "description": "Width in pixels for auto-placement (min 10). Only used when x1,y1,x2,y2 are all omitted. If manual coords are provided, omit width and height entirely."
  },
  "height": {
   "type": "integer",
   "description": "Height in pixels for auto-placement (min 10). Only used when x1,y1,x2,y2 are all omitted. If manual coords are provided, omit width and height entirely."
  },
  "tooltip": {
   "type": "string",
   "description": "Hover text shown on canvas (max 100 chars). Optional."
  },
  "link_url": {
   "type": "string",
   "description": "Click-through URL (https:// only). Optional."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "x1": 0,
  "x2": 100,
  "y1": 0,
  "y2": 100,
  "message": "Region painted. Store your owner_token — it is required to update content later.",
  "region_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "price_paid": "$100.00",
  "owner_token": "secret-uuid-store-this",
  "pixel_count": 10000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/canvas-0000402-xyz-13229def/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from canvas.0000402.xyz](https://www.zero.xyz/host/canvas.0000402.xyz/llms.txt)
