{"uid":"cap_GXsDCENfuXAwmuLyziwlO","slug":"x402-image-tools-smart-thumbnail-generator-10f8df3a","name":"x402 Image Tools – Smart Thumbnail Generator","description":"A square thumbnail of an image, smart-cropped around its most interesting region, as WebP by default.","url":"https://image.kagurazaka.dev/v1/thumbnail?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"https URL of a JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG image (up to 20 MB, 40 megapixels)"},"size":{"type":"integer","description":"side in pixels (16-1024, default 256)"},"format":{"enum":["webp","avif","png","jpeg","gif","tiff"],"type":"string","description":"output format (default: the input's)"},"inline":{"type":"boolean","description":"also return the image as a data URL when it is at most 1 MB"}}},"responseSchema":{"type":"json","example":{"url":"https://dn8i8p8knpn68.cloudfront.net/results/images/3f1c2b9e.webp?Expires=...","bytes":48213,"width":256,"format":"webp","height":256,"expires_in":3600,"input_bytes":912345}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1ay6NZMbL0RGMIp1lWgtg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a square thumbnail of an image by smart-cropping around the most interesting region, returned as WebP (or other formats) at a configurable pixel size.","exampleAgentPrompt":"Can you generate a 512-pixel square WebP thumbnail of this image — https://example.com/photo.jpg — smart-cropped around the most interesting part?","exampleUseCases":[{"title":"Product catalog thumbnail generation","prompt":"Take this product image at https://shop.example.com/items/sneaker.png and make a 256-pixel square WebP thumbnail, smart-cropped around the main subject, so I can use it in the catalog grid."},{"title":"Avatar or profile picture crop","prompt":"I have a full-body photo at https://cdn.example.com/users/alice.jpg — can you smart-crop it down to a 128-pixel square thumbnail in PNG format for Alice's profile picture?"},{"title":"Blog post preview image","prompt":"Can you create a 512-pixel square AVIF thumbnail from this high-res photo at https://blog.example.com/hero-image.webp, cropped around the most visually interesting region?"}],"resultDescription":"Returns a JSON object containing a CDN URL to the generated square thumbnail (valid for 3600 seconds), the thumbnail's dimensions (width and height in pixels), format, file size in bytes, and the original image's file size. Optionally includes the image as a base64 data URL if it is under 1 MB and the inline flag was set.","failureModes":["Image URL is unreachable or returns a non-200 response — returns an error indicating the source could not be fetched","Image exceeds 20 MB or 40 megapixel limit — returns a payload-too-large or dimension error","Unsupported image format provided — returns a format validation error","Requested size outside 16–1024 range — returns a validation error","Payment not provided or insufficient — returns HTTP 402 requiring USDC payment","Temporary CDN or processing backend failure — returns a 5xx error"],"whenToPreferThis":"Choose this endpoint when you need a square, content-aware cropped thumbnail rather than a naive center or edge crop. It is ideal for product images, profile pictures, and content previews where the subject may not be centered. Prefer it over generic resize endpoints when smart-cropping around the most visually salient region matters, and when WebP or AVIF output is desired for web performance. The $0.002 per-call pricing via x402 makes it suitable for on-demand, per-image pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:35:22.846Z","isFirstParty":false,"canonicalSlug":"x402-image-tools-smart-thumbnail-generator-10f8df3a"}