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
POST https://batchimageresizer.usefulweb.site/api/v1/calculate– run Batch Image Resizer & CropperGET https://batchimageresizer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
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.
| Field | Type | Default | Description |
|---|---|---|---|
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. |
mode | select (fit, cover, percent, aspect) | "fit" | Resize mode |
width | integer | — | Width. Needed for "Exact size"; for "Fit" give width, height or both. |
height | integer | — | Height |
percent | number | 50 | Percentage. Only for "Scale by percentage". |
aspect | select (1:1, 4:5, 16:9, 9:16, 3:2, 4:3) | "1:1" | Aspect ratio. Only for "Crop to aspect ratio". |
gravity | select (center, north, south, west, east, northwest, northeast, southwest, southeast) | "center" | Crop focus. Which part of the image is kept when cropping. |
upscale | boolean | false | Allow enlarging small images |
format | select (same, jpeg, png, webp, avif) | "same" | Output format |
quality | integer | 85 | Quality. For JPG, WebP and AVIF. |
keepMetadata | boolean | false | Keep 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)
- Streamable HTTP endpoint:
https://batchimageresizer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
batch_image_resizer - Local stdio connector:
node src/mcp-stdio.ts --tool=batch-image-resizer
{
"mcpServers": {
"batch-image-resizer": { "type": "http", "url": "https://batchimageresizer.usefulweb.site/mcp" }
}
}