{"uid":"cap_nJYmAbqXFY625BJl5w7Is","slug":"tanod-imagepeek-image-resize-098135f0","name":"Tanod imagepeek Image Resize","description":"Resize an image using inside, contain, cover or fill mode. Use when an image must be scaled to given dimensions, keeping or ignoring its aspect ratio. Add output=url for a 24 h link.","url":"https://tanod.dev/v1/image/resize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fit":{"enum":["inside","contain","cover","fill"],"type":"string","default":"inside"},"url":{"type":["string","null"],"default":null,"maxLength":2048},"scale":{"type":["number","null"],"default":null,"maximum":10,"exclusiveMinimum":0},"width":{"type":["integer","null"],"default":null,"maximum":32768,"minimum":1},"format":{"anyOf":[{"enum":["png","jpeg","webp","gif","tiff","bmp","ico","avif"],"type":"string"},{"type":"null"}],"default":null},"height":{"type":["integer","null"],"default":null,"maximum":32768,"minimum":1},"output":{"enum":["base64","url"],"type":"string","default":"base64"},"quality":{"type":["integer","null"],"default":null,"maximum":100,"minimum":1},"upscale":{"type":"boolean","default":false},"lossless":{"type":"boolean","default":false},"optimize":{"type":"boolean","default":false},"resample":{"enum":["nearest","box","bilinear","hamming","bicubic","lanczos"],"type":"string","default":"lanczos"},"background":{"type":["string","null"],"default":null,"pattern":"^(#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?|transparent)$"},"auto_orient":{"type":"boolean","default":true},"progressive":{"type":"boolean","default":false},"image_base64":{"type":["string","null"],"default":null,"maxLength":13333464}}},"responseSchema":{"type":"json","example":{"bytes":1386,"input":{"bytes":2183,"width":256,"format":"png","frames":1,"height":256,"animated":false,"has_alpha":true},"notes":[],"width":64,"format":"png","height":64,"source":{"url":"https://python-pillow.org","library":"Pillow","license":"MIT-CMU (HPND)"},"final_url":"https://tanod.dev/icon.png","operation":"resize","source_url":"https://tanod.dev/icon.png","data_base64":"iVBORw0KGgoAAAAN... (trimmed: 1,848 base64 characters in the reply)","content_type":"image/png","upscale_prevented":false}},"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_PemeR56qiJ-qmmaa9di6s","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":"Resizes an image from a URL or base64 input to specified dimensions using configurable fit modes, resampling filters, and output formats.","exampleAgentPrompt":"Resize this image (https://example.com/photo.jpg) to 800 pixels wide and 600 pixels tall using cover fit so it fills the frame exactly, and output it as a WebP at quality 85.","exampleUseCases":[{"title":"Thumbnail generation for product catalog","prompt":"Take this product image at https://shop.example.com/items/chair.png and resize it to 300x300 pixels using contain fit so nothing gets cropped, add a white background for the padding, and give me a JPEG at quality 80."},{"title":"Avatar scaling for user profiles","prompt":"Scale down this user avatar from https://cdn.example.com/avatars/user123.jpg to 128x128 pixels using cover so it fills the square perfectly, and return it as a WebP."},{"title":"Responsive image asset preparation","prompt":"I need to resize this banner image at https://media.example.com/hero.png to half its original size using a scale of 0.5, keep it as PNG, and use lanczos resampling for best quality."}],"resultDescription":"Returns the resized image as binary data in the requested output format (e.g. PNG, JPEG, WebP, AVIF). The image is transformed according to the specified fit mode (inside, contain, cover, or fill), dimensions or scale factor, resampling algorithm, and encoding settings such as quality and lossless compression.","failureModes":["Image URL is not publicly accessible or returns a non-2xx status — request fails","Image exceeds 10 MB limit — rejected with size error","Invalid width/height values outside 1–32768 range — validation error","Unsupported image format provided as input — processing error","scale factor outside 0–10 range — validation error","background color string does not match expected hex pattern — validation error","Both url and image_base64 omitted — missing input error"],"whenToPreferThis":"Choose this endpoint when you need to resize, scale, or reformat an image from a public URL or base64 source with fine-grained control over fit mode, resampling filter, output format, and encoding quality. It is ideal for thumbnail generation, responsive image preparation, format conversion during resize, and cover/contain cropping — all in a single API call. Prefer it over general-purpose image CDNs when you need on-demand programmatic control and payment-per-call pricing rather than a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-02T06:30:50.509Z","isFirstParty":false,"canonicalSlug":"tanod-imagepeek-image-resize-098135f0"}