Add image convert and compress endpoints to the public API
POST /api/v1/images/convert and /api/v1/images/compress turn batches of images into other formats or smaller files of the same format.
Both endpoints accept up to 20 images per request and return size figures and per-image errors alongside the outputs. Convert covers PNG, JPEG, WebP, AVIF, GIF, TIFF, BMP, ICO, ICNS and HEIC input; compress keeps each image’s format and can leave the original alone when the result would be larger. Presets (balanced, small, fast, lossless) set quality and effort defaults, with quality, max dimensions and metadata retention available as overrides. Usage is metered as one conversion per output image, so converting one file to three formats counts as three. The API dashboard has a playground form for both endpoints.
Comments
Log in to join the conversation.