/image-api

Image API

A simple URL-based API for resizing, compressing, and converting images programmatically. Perfect for CMSs, static sites, and automated pipelines.

Public beta — free during preview

Quickstart

Every endpoint accepts multipart image uploads or a remote url parameter.

curl -X POST https://resizeimagesfree.com/api/v1/resize \
  -F "image=@photo.jpg" \
  -F "width=1200" \
  -F "format=webp" \
  -o resized.webp

Endpoints

POST/api/v1/resize

Resize to exact dimensions, max box, or by percentage.

ParameterTypeDescription
widthnumberTarget width in pixels
heightnumberTarget height in pixels
fitcover | contain | fillResize behavior (default: contain)
formatjpg | png | webpOutput format
POST/api/v1/compress

Compress an image toward a target file size or quality level.

ParameterTypeDescription
quality1–100JPEG/WebP quality (default: 82)
target_kbnumberTarget size in KB (auto-tunes quality)
formatjpg | webpOutput format
POST/api/v1/convert

Convert between formats without re-sampling.

ParameterTypeDescription
formatjpg | png | webpTarget format (required)
backgroundhex colorFill for PNG → JPG transparency
POST/api/v1/remove-bg

AI background removal — returns a transparent PNG.

ParameterTypeDescription
modelauto | portrait | productModel hint (default: auto)

Response

Success responses return the processed image binary with the appropriate Content-Type. Errors return JSON:

{
  "error": "invalid_format",
  "message": "format must be one of jpg, png, webp"
}

Authentication

During beta, all endpoints are unauthenticated with fair-use rate limits (60 requests / minute per IP). Production usage will require an API key sent as Authorization: Bearer <key>.

Prefer no code?

Every API endpoint is available as a free interactive tool in the browser.