API & MCP

Everything a person can do on Batch Image Resizer & Cropper, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Batch Image Resizer & Cropper

Upload one image or a ZIP with up to 30 images and resize them all the same way: to an exact size (cropped to fill, with a chosen focus point), to fit within a box, by percentage, or cropped to a social-media aspect ratio. Choose the output format and quality and download everything as one ZIP with a per-file report.

Inputs of Batch Image Resizer & Cropper
FieldTypeDefaultDescription
images (required)file—Image or ZIP of images. One image (JPG, PNG, WebP, AVIF, GIF, TIFF, HEIC) or a ZIP with up to 30 images, max 50 MB per image and 150 MB in total. Your browser form sends one file, so put several images into a ZIP.
modeselect (fit, cover, percent, aspect)"fit"Resize mode
widthinteger—Width. Needed for "Exact size"; for "Fit" give width, height or both.
heightinteger—Height
percentnumber50Percentage. Only for "Scale by percentage".
aspectselect (1:1, 4:5, 16:9, 9:16, 3:2, 4:3)"1:1"Aspect ratio. Only for "Crop to aspect ratio".
gravityselect (center, north, south, west, east, northwest, northeast, southwest, southeast)"center"Crop focus. Which part of the image is kept when cropping.
upscalebooleanfalseAllow enlarging small images
formatselect (same, jpeg, png, webp, avif)"same"Output format
qualityinteger85Quality. For JPG, WebP and AVIF.
keepMetadatabooleanfalseKeep EXIF metadata (camera, date, GPS)

Example request

Two images in a ZIP → 1:1 squares, WebP

curl -X POST https://batchimageresizer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"images":{"filename":"photos.zip","contentType":"application/zip","contentBase64":"UEsDBBQAAAgAAAAAIQAvZbbGVAAAAFQAAAAHAAAAcmVkLnBuZ4lQTkcNChoKAAAADUlIRFIAAAAoAAAAHgEDAAAAZBPOngAAAANQTFRF0EBArFYGfwAAAAxJREFUCNdjYBh6AAAAtAABXnGQvwAAAABJRU5ErkJgglBLAwQUAAAIAAAAACEA+zRozFQAAABUAAAACQAAAGdyZWVuLnBuZ4lQTkcNChoKAAAADUlIRFIAAAAeAAAAKAEDAAAA093YUQAAAANQTFRFQKBADztNYwAAAAxJREFUCNdjYBgeAAAAyAABfGNpfQAAAABJRU5ErkJgglBLAQIUAxQAAAgAAAAAIQAvZbbGVAAAAFQAAAAHAAAAAAAAAAAAAACkgQAAAAByZWQucG5nUEsBAhQDFAAACAAAAAAhAPs0aMxUAAAAVAAAAAkAAAAAAAAAAAAAAKSBeQAAAGdyZWVuLnBuZ1BLBQYAAAAAAgACAGwAAAD0AAAAAAA="},"mode":"aspect","aspect":"1:1","format":"webp","quality":80}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "batch-image-resizer": { "type": "http", "url": "https://batchimageresizer.usefulweb.site/mcp" }
  }
}