DocsImage Tools

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

POST/api/image-compress

Compress an image to reduce file size while maintaining visual quality. Supports JPEG, PNG, and WebP formats.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file (JPG, PNG, WebP)
qualitynumberOptionalCompression quality, 10-100. Default: 80
targetSizeKBnumberOptionalTarget file size in KB. Overrides quality if set.
keepMetadatastringOptionalSet to "true" to preserve EXIF metadata
Response:Binary file
bash
curl -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.jpg

Image Resize

POST/api/image-resize

Resize an image to specific dimensions or by percentage. Supports pixel dimensions and percentage scaling.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
widthnumberOptionalTarget width in pixels
heightnumberOptionalTarget height in pixels
percentagenumberOptionalScale percentage (e.g. 50 for half size)
fitstringOptional"inside" (maintain aspect ratio) or "fill" (stretch to exact dimensions)
Response:Binary file
bash
# 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.jpg

Image Convert

POST/api/image-convert

Convert an image between formats. Supports PNG, JPG, WebP, and AVIF.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
formatstringRequiredTarget format: "png", "jpg", "webp", or "avif"
qualitynumberOptionalOutput quality, 10-100
Response:Binary file
bash
curl -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.webp

Image Rotate

POST/api/image-rotate

Rotate and/or flip an image. Supports arbitrary rotation angles and horizontal/vertical flipping.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
anglenumberRequiredRotation angle in degrees (e.g. 90, 180, 270)
flipHstringOptionalSet to "true" to flip horizontally
flipVstringOptionalSet to "true" to flip vertically
Response:Binary file
bash
curl -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.jpg

Image Crop

POST/api/image-crop

Crop an image to a specific rectangular region.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
xnumberRequiredLeft offset of the crop rectangle in pixels
ynumberRequiredTop offset of the crop rectangle in pixels
widthnumberRequiredWidth of the crop rectangle in pixels
heightnumberRequiredHeight of the crop rectangle in pixels
Response:Binary file
bash
curl -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.jpg

Remove Background

POST/api/remove-bg

Automatically remove the background from an image. Returns a PNG with transparent background.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
Response:PNG image with transparent background
bash
curl -X POST https://freefiletools.io/api/remove-bg \
  -H "x-api-key: fft_your_api_key" \
  -F "file=@photo.jpg" \
  -o no-background.png

Image Upscale

POST/api/image-upscale

Upscale an image using AI to increase resolution while preserving detail.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
scalenumberOptionalUpscale factor: 2 or 4. Default: 2
Response:Binary file
bash
curl -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.jpg

Blur Face

POST/api/blur-face

Automatically detect and blur all faces in an image for privacy protection.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
Response:Binary file
bash
curl -X POST https://freefiletools.io/api/blur-face \
  -H "x-api-key: fft_your_api_key" \
  -F "file=@photo.jpg" \
  -o blurred.jpg

Watermark Image

POST/api/watermark-image

Add a text watermark to an image. Customize the text and position.

Parameters

NameTypeRequiredDescription
fileFileRequiredImage file
textstringRequiredWatermark text
positionstringOptionalPosition: "center", "top-left", "top-right", "bottom-left", "bottom-right"
Response:Binary file
bash
curl -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