{"uid":"cap_mdaxJnuW_j75qALxHnDe8","slug":"x402-image-tools-placeholder-blurhash-generator-512c1ca2","name":"x402 Image Tools – Placeholder & BlurHash Generator","description":"What a page shows while an image loads: its BlurHash, a tiny blurred WebP preview as a data URL, its average color and its dimensions.","url":"https://image.kagurazaka.dev/v1/placeholder?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"width":{},"height":{},"blurhash":{},"average_color":{},"preview_data_url":{}}}}}}},"responseSchema":{"type":"json","example":{"width":1024,"height":683,"blurhash":"LEHV6nWB2yk8pyo0adR*.7kCMdnj","average_color":"#7a6b55","preview_data_url":"data:image/webp;base64,..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tvRoWmiShK3wr7q8t7H-T","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a BlurHash string, a tiny blurred WebP preview as a data URL, the average color, and the pixel dimensions of a given image URL.","exampleAgentPrompt":"Can you get the BlurHash, blurred WebP preview, average color, and dimensions for this image: https://example.com/photo.jpg? I need it for a lazy-loading placeholder.","exampleUseCases":[{"title":"Lazy-loading placeholder for blog images","prompt":"I need a BlurHash and a tiny base64 blurred WebP preview for this image so I can show a placeholder while it loads: https://myblog.com/images/hero.jpg — also grab the dimensions and average color."},{"title":"Average color for dynamic UI theming","prompt":"What's the average hex color of this product photo at https://shop.example.com/products/sneaker.png? Also give me the width and height and a blurhash."},{"title":"Precomputing placeholders for a photo gallery","prompt":"For this gallery image at https://cdn.mygallery.com/uploads/sunset.webp, can you generate the BlurHash string, a blurred data URL preview, average color, and pixel dimensions so I can embed them server-side?"}],"resultDescription":"A JSON object with five fields: width (pixels), height (pixels), blurhash (compact string encoding of a blurred representation), average_color (hex string like #7a6b55), and preview_data_url (a data:image/webp;base64,… string usable directly in an img src for an instant blurred placeholder).","failureModes":["Image URL is not publicly accessible or returns a non-200 response","Image exceeds 20 MB or 40 megapixel limit","Unsupported image format provided","Malformed or missing url query parameter","Network timeout fetching the remote image","Payment not completed (402 response before processing)"],"whenToPreferThis":"Choose this endpoint when you need to precompute lazy-loading placeholders for images — specifically when you want a BlurHash string and/or a tiny blurred WebP data URL alongside the image's average color and dimensions, all in a single call. Ideal for web performance pipelines, CMS integrations, or any UI that shows a colored or blurred placeholder while the full image loads. If you only need dominant colors or full image metadata, use the sibling color or metadata endpoints instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:36:53.731Z","isFirstParty":false,"canonicalSlug":"x402-image-tools-placeholder-blurhash-generator-512c1ca2"}