{"uid":"cap_La298yUIS5maDvyfhxpY3","slug":"x402-image-tools-format-converter-60dc1a1c","name":"x402 Image Tools – Format Converter","description":"Convert an image at a URL to another format, with an optional quality or lossless encoding. JPEG output gets a white background where the image was transparent.","url":"https://image.kagurazaka.dev/v1/convert?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)"},"format":{"enum":["webp","avif","png","jpeg","gif","tiff"],"type":"string","description":"the output format"},"inline":{"type":"boolean","description":"also return the image as a data URL when it is at most 1 MB"},"quality":{"type":"integer","description":"1-100"},"lossless":{"type":"boolean","description":"lossless WebP or AVIF"}}},"responseSchema":{"type":"json","example":{"url":"https://dn8i8p8knpn68.cloudfront.net/results/images/3f1c2b9e.webp?Expires=...","bytes":48213,"width":800,"format":"avif","height":600,"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_Wvcx7-TB1bhmJWlvmkjF2","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":"Converts an image at a URL to a specified output format (WebP, AVIF, PNG, JPEG, GIF, or TIFF) with optional quality or lossless encoding settings","exampleAgentPrompt":"Convert this PNG image at https://example.com/photo.png to WebP format with quality 85 and return a download link.","exampleUseCases":[{"title":"PNG to JPEG for email attachment","prompt":"I have a transparent PNG at https://cdn.mysite.com/logo.png — can you convert it to JPEG with quality 90? The transparent parts should show as white."},{"title":"Lossless AVIF for archiving","prompt":"Convert the image at https://photos.example.com/raw_shot.tiff to AVIF using lossless encoding and give me the URL to the result."},{"title":"WebP conversion for web optimization","prompt":"Take this image at https://assets.myblog.com/hero.jpg and convert it to WebP at quality 75 — I want to use it on my website and need a CDN link back."}],"resultDescription":"A JSON object containing: a temporary CDN URL to the converted image (expires in ~1 hour), the output file size in bytes, the image width and height in pixels, the output format name, the expiry duration in seconds, and the original input file size in bytes. Optionally includes the image as a base64 data URL if it is under 1 MB and inline was requested.","failureModes":["Image URL unreachable or returns non-2xx — conversion fails with an error","Image exceeds 20 MB or 40 megapixel limit — rejected with size error","Unsupported input format (e.g. BMP, RAW) — rejected","Invalid quality value outside 1–100 range — validation error","Lossless flag used with a non-supporting format (e.g. JPEG) — may be ignored or error","Network timeout fetching the source image — returns fetch error","Payment not attached or insufficient — x402 payment required response"],"whenToPreferThis":"Choose this endpoint when you need to change an image's file format from one supported type to another, optionally controlling quality or lossless encoding. Ideal for preparing images for web delivery (WebP/AVIF), converting transparent PNGs to JPEG-compatible format, or reformatting for compatibility. Prefer other sibling endpoints on image.kagurazaka.dev for resizing, compression, cropping, or applying filters — this endpoint is specifically for format conversion only.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:36:12.609Z","isFirstParty":false,"canonicalSlug":"x402-image-tools-format-converter-60dc1a1c"}