Resize Image API
Resize by pixels, percentage, longest side or target file size — lock aspect ratio, never enlarge, pick the resampling filter, batch.
Environment
| Environment | Base URL |
|---|---|
| Production | https://api.sadafiles.com/v1 |
There is one environment and no sandbox, so every request here is real and counts toward your limits.
Request
POSThttps://api.sadafiles.com/v1/tools/resize-image
- Content type
- multipart/form-data
- Auth
- X-API-Key with tools:run
- Accepts
- jpg, png, webp, avif, gif, bmp, tiff, heic and 1 more
- Files per request
- 1 to 500
- Largest file
- 2 GB
- Job timeout
- 120 s
- Rate weight
- 2 units
- Web tool
- Use Resize Image without code
Parameters
Send these as a JSON string in the options form field. Anything else is rejected.
| Name | Type | Default | Allowed |
|---|---|---|---|
mode | string | pixels | pixels, percent, longestSide, targetSize |
width | integer | — | min 1, max 30000, px |
height | integer | — | min 1, max 30000, px |
percent | integer | 50 | min 1, max 1000, % |
longest | integer | 1920 | min 1, max 30000, px |
targetKbOptional maximum KB after resizing. Pixel dimensions are preserved; impossible limits report an error. | integer | — | min 5, KB |
keepAspect | boolean | true | — |
noEnlarge | boolean | true | — |
fit | string | inside | inside, cover, fill, contain |
filter | string | lanczos3 | lanczos3, bicubic, bilinear, nearest |
formatPNG and WebP preserve transparent backgrounds. JPG flattens transparency. | string | same | same, png, jpg, webp |
Response
| Status | Body | When |
|---|---|---|
201 | same | The run finished within 60 seconds |
202 | Job summary JSON | Still running; poll the job |
4xx, 5xx | Error JSON | See error codes |
A file response carries X-Sada-Job and X-Sada-Expires-At. For long work, post to /v1/tools/resize-image/jobs instead. See jobs and webhooks.
Also runs on the device
In the web tool and apps, Resize Image can run locally with no upload. The API always processes on the server.
Ready settings
These settings power the matching pages on the site, and work the same in the API.
| Use | options |
|---|---|
| Resize Image for Instagram Post (1080×1350) | {"mode":"pixels","width":1080,"height":1350,"fit":"cover"} |
| Resize Image for Instagram Story (1080×1920) | {"mode":"pixels","width":1080,"height":1920,"fit":"cover"} |
| Resize Image for YouTube Thumbnail (1280×720) | {"mode":"pixels","width":1280,"height":720,"fit":"cover"} |
| Resize Image for LinkedIn Banner (1584×396) | {"mode":"pixels","width":1584,"height":396,"fit":"cover"} |
| Resize Photo for WhatsApp DP (640×640) | {"mode":"pixels","width":640,"height":640,"fit":"cover"} |
| Resize Photo to Passport Size 35×45 mm | {"mode":"pixels","width":413,"height":531,"fit":"cover"} |
| Resize Image to A4 Size | {"mode":"pixels","width":2480,"height":3508,"fit":"inside"} |
| Resize Image for Google Play Icon (512×512) | {"mode":"pixels","width":512,"height":512,"fit":"cover"} |
| Resize Image for Google Play Feature Graphic (1024×500) | {"mode":"pixels","width":1024,"height":500,"fit":"cover"} |
| Resize Image for Apple App Store Icon (1024×1024) | {"mode":"pixels","width":1024,"height":1024,"fit":"cover"} |
| Resize Image for Snap Store Banner (1920×640) | {"mode":"pixels","width":1920,"height":640,"fit":"cover"} |
| Resize Image for Microsoft Store Logo (300×300) | {"mode":"pixels","width":300,"height":300,"fit":"cover"} |
Try it yourself!
Pick a file, set the options and run a real request with your key. The code follows your changes.

