{"uid":"cap_RxniWkXUYMFq-9fbI0urg","slug":"rengi-forge-sprite-pixelate-60a2816d","name":"Rengi Forge: Sprite Pixelate","description":"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","url":"https://rengi.dev/v1/sprite-tools/pixelate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VdR7eowGoeH8XCBFD_VCz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Clean up imported sprite sheet","prompt":"I have a sprite sheet I exported from Aseprite but it got blurry somehow — can you pixelate it back to clean pixel art, auto-detect the pixel scale, and reduce it to 16 colors?"},{"title":"Snap sprite to NES palette","prompt":"Take this character sprite and snap its colors to the NES palette — here are the hex codes — and make sure the alpha is hard-cut at threshold 200. Keep 16 colors max."},{"title":"Pixelate photo for retro game asset","prompt":"Turn this photo of a forest into pixel art for my indie game — detect the best pixel grid size automatically, quantize to 8 colors, and give me a clean hard-alpha PNG."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:40:58.776Z","isFirstParty":false,"canonicalSlug":"rengi-forge-sprite-pixelate-60a2816d"}