# Rengi Forge: Sprite Pixelate

> Rengi Forge: Sprite Pixelate is a paid API for AI agents from rengi.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-22).

Detects the true pixel grid of an image, downscales it to that grid, snaps colors to a palette, and applies hard alpha — converting raster art into clean pixel art.

## Facts

- Endpoint: POST https://rengi.dev/v1/sprite-tools/pixelate?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rengi-forge-sprite-pixelate-60a2816d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RxniWkXUYMFq-9fbI0urg

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 rengi-forge-sprite-pixelate-60a2816d -d '<json body>'
```

Example prompt: Take this sprite image and clean it up as pixel art — auto-detect the pixel grid scale, snap the colors down to 16 using a GameBoy palette (#0f380f, #306230, #8bac0f, #9bbc0f), and apply hard alpha with a threshold of 128.

## When to prefer this

Choose this endpoint when you need to convert or clean up pixel art sprites for 2D game development — especially when you need automatic pixel grid detection, palette snapping to a specific set of colors, and hard alpha in a single API call. Prefer it over generic image resizing APIs because it understands pixel art structure and can auto-detect the native grid without manual input.

## Known failure modes

- Image cannot be decoded (invalid base64 or unsupported format) — returns 400 error
- No pixel grid detectable in a continuous-tone photo without a scale hint — may produce poor results
- Palette array contains invalid hex strings — validation error
- Both image and imageUrl omitted — returns missing input error
- Scale value out of range (must be 1–64) — returns 422 validation error
- Colors value out of range (must be 2–64) — returns validation error

## How this service works

Sprite tools: Clean pixel art: find the true pixel grid, downscale to it, snap to a palette, hard alpha. Full schema: https://rengi.dev/v1/sprite-tools/schema

## Output

Returns a processed image (PNG) where the true pixel grid has been identified and aligned, the image downscaled to that grid resolution, colors snapped to the nearest palette entry (or auto-quantized to the specified count), and transparency binarized with a hard alpha threshold.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "description": "Base64 PNG, JPEG or WebP."
  },
  "scale": {
   "type": "integer",
   "maximum": 64,
   "minimum": 1,
   "description": "Size of one art pixel in image pixels; detected when omitted."
  },
  "colors": {
   "type": "integer",
   "default": 16,
   "maximum": 64,
   "minimum": 2
  },
  "palette": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 256,
   "minItems": 2,
   "description": "Hex colors to snap to."
  },
  "imageUrl": {
   "type": "string",
   "format": "uri"
  },
  "alphaThreshold": {
   "type": "integer",
   "default": 128,
   "maximum": 255,
   "minimum": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rengi-forge-sprite-pixelate-60a2816d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rengi.dev](https://www.zero.xyz/host/rengi.dev/llms.txt)
