Free image compression API

Drop a JPEG, PNG or WebP and get it back in the same format, saved again to be smaller, with the camera and GPS data removed. The form calls the same free API your code can call: one POST, no API key and no account. The result waits in Storage for 24 hours.

The whole API
curl -s -X POST https://aisenseapi.com/services/v1/image_compress \
  -F "file=@photo.jpg" \
  -F "quality=70"

{
  "storage_id": "f87efab2-9d0d-46e4-b1d8-8b8776ab0a21",
  "storage_url": "https://aisenseapi.com/services/v1/storage/f87efab2-9d0d-46e4-b1d8-8b8776ab0a21",
  "sha256_hash": "6c930ff8216f4c681e85d1f7558ca7b4f7c9d6c6a988187d2b8df2d485876f03",
  "bytes": 260768,
  "expire_timestamp": 1790767674,
  "expire_datetime": "2026-09-30T11:27:54+00:00",
  "content_type": "image/jpeg",
  "filename": "result.jpg",
  "operation": "image_compress",
  "format": "jpeg",
  "width": 1600,
  "height": 1200,
  "input_format": "jpeg",
  "input_bytes": 641358
}
No API key No account Same format out EXIF removed 5000 req / IP / 24h

Try it in the browser

This form posts your image to the same endpoint and shows the stored result. The image is sent to aisenseapi.com, and the result is kept for 24 hours at a link that anyone with the link can open.

Drop an image here or click to choose one, or paste it with Ctrl+V. JPEG, PNG or WebP, up to 10 MB.
Lower is smaller. For JPEG and WebP only.

How the compression works

The API

POST https://aisenseapi.com/services/v1/image_compress with multipart/form-data.

FieldRequiredMeaning
fileyesThe image: JPEG, PNG or WebP.
qualityno40 to 95, for JPEG and WebP. 82 when left out. A PNG takes none.

A format field is refused; the result always has the format of the upload. A GET on storage_url returns the image with its own image type.

The answer is a Storage link

The endpoint never sends the image in its answer. It stores the result for 24 hours and answers with the same fields the Temporary Storage API answers with, plus what the result is:

FieldMeaning
storage_id, storage_urlWhere the result is. A GET on the URL returns the image.
sha256_hash, bytesThe digest and size of the stored image.
expire_timestamp, expire_datetimeWhen the result is removed, 24 hours after it was stored.
content_type, filenameThe type of the image and the name to save it under.
operation, format, width, heightThe endpoint that made it, and the format and size of the result in pixels.
input_format, input_bytesWhat the upload was, so the saving can be read off.

The example at the top of the page comes from a test run with a test image of 1600 x 1200 pixels. The id and the expiry are different on every call, and the sizes depend on the image.

Anyone with the link can open the image until it expires, so do not send pictures of people or anything confidential. Stored results count against the Storage budget of 80 MB per IP address per day.

Limits

Errors

A refused request stores nothing and answers with error. The endpoint's own refusals also carry fix, a sentence saying what to send instead.

StatusWhen
400A field is missing, unknown or out of range, the upload is not one whole file, or ImageMagick cannot read the image.
405The method is not POST.
413The upload, its number of pixels or the result is over a limit.
415The body is not multipart/form-data, or the file is not a JPEG, PNG or WebP.
429More than 5000 requests from one IP address in 24 hours, or the day's Storage budget is used up.
503Two images are being converted already, the conversion took more than 45 seconds, or the service cannot convert right now.

Questions

Is the image compression API free?

Yes. No API key, no account and no sign up. The limit is 5000 requests per IP address per 24 hours, and stored results count against the Storage budget of 80 MB per IP address per day.

Is the compression lossless?

For PNG, yes. JPEG and WebP are saved again at the quality you choose, which is lossy.

Why is my result larger than the upload?

The image was already compressed harder than the quality you chose. Keep the original, or choose a lower quality.

Does it resize the image?

No. An image the EXIF data marks as rotated is turned upright, which swaps its width and height. Any other image keeps both.

All image endpoints All free public APIs