Image Tools API
Endpoints for image compression, resizing, conversion, rotation, cropping, background removal, upscaling, face blurring, and watermarking. All endpoints accept multipart/form-data and return the processed image as a binary file.
Image Compress
/api/image-compressCompress an image to reduce file size while maintaining visual quality. Supports JPEG, PNG, and WebP formats.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file (JPG, PNG, WebP) |
quality | number | Optional | Compression quality, 10-100. Default: 80 |
targetSizeKB | number | Optional | Target file size in KB. Overrides quality if set. |
keepMetadata | string | Optional | Set to "true" to preserve EXIF metadata |
Binary filecurl -X POST https://freefiletools.io/api/image-compress \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "quality=75" \
-o compressed.jpgImage Resize
/api/image-resizeResize an image to specific dimensions or by percentage. Supports pixel dimensions and percentage scaling.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
width | number | Optional | Target width in pixels |
height | number | Optional | Target height in pixels |
percentage | number | Optional | Scale percentage (e.g. 50 for half size) |
fit | string | Optional | "inside" (maintain aspect ratio) or "fill" (stretch to exact dimensions) |
Binary file# Resize to specific width (height auto-calculated)
curl -X POST https://freefiletools.io/api/image-resize \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "width=800" \
-o resized.jpg
# Resize by percentage
curl -X POST https://freefiletools.io/api/image-resize \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "percentage=50" \
-o resized.jpgImage Convert
/api/image-convertConvert an image between formats. Supports PNG, JPG, WebP, and AVIF.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
format | string | Required | Target format: "png", "jpg", "webp", or "avif" |
quality | number | Optional | Output quality, 10-100 |
Binary filecurl -X POST https://freefiletools.io/api/image-convert \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.png" \
-F "format=webp" \
-F "quality=85" \
-o photo.webpImage Rotate
/api/image-rotateRotate and/or flip an image. Supports arbitrary rotation angles and horizontal/vertical flipping.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
angle | number | Required | Rotation angle in degrees (e.g. 90, 180, 270) |
flipH | string | Optional | Set to "true" to flip horizontally |
flipV | string | Optional | Set to "true" to flip vertically |
Binary filecurl -X POST https://freefiletools.io/api/image-rotate \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "angle=90" \
-o rotated.jpgImage Crop
/api/image-cropCrop an image to a specific rectangular region.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
x | number | Required | Left offset of the crop rectangle in pixels |
y | number | Required | Top offset of the crop rectangle in pixels |
width | number | Required | Width of the crop rectangle in pixels |
height | number | Required | Height of the crop rectangle in pixels |
Binary filecurl -X POST https://freefiletools.io/api/image-crop \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "x=100" \
-F "y=50" \
-F "width=500" \
-F "height=400" \
-o cropped.jpgRemove Background
/api/remove-bgAutomatically remove the background from an image. Returns a PNG with transparent background.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
PNG image with transparent backgroundcurl -X POST https://freefiletools.io/api/remove-bg \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-o no-background.pngImage Upscale
/api/image-upscaleUpscale an image using AI to increase resolution while preserving detail.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
scale | number | Optional | Upscale factor: 2 or 4. Default: 2 |
Binary filecurl -X POST https://freefiletools.io/api/image-upscale \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "scale=4" \
-o upscaled.jpgBlur Face
/api/blur-faceAutomatically detect and blur all faces in an image for privacy protection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
Binary filecurl -X POST https://freefiletools.io/api/blur-face \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-o blurred.jpgWatermark Image
/api/watermark-imageAdd a text watermark to an image. Customize the text and position.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Image file |
text | string | Required | Watermark text |
position | string | Optional | Position: "center", "top-left", "top-right", "bottom-left", "bottom-right" |
Binary filecurl -X POST https://freefiletools.io/api/watermark-image \
-H "x-api-key: fft_your_api_key" \
-F "file=@photo.jpg" \
-F "text=Copyright 2024" \
-F "position=bottom-right" \
-o watermarked.jpg