Image API
A simple URL-based API for resizing, compressing, and converting images programmatically. Perfect for CMSs, static sites, and automated pipelines.
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.webpEndpoints
/api/v1/resizeResize to exact dimensions, max box, or by percentage.
| Parameter | Type | Description |
|---|---|---|
| width | number | Target width in pixels |
| height | number | Target height in pixels |
| fit | cover | contain | fill | Resize behavior (default: contain) |
| format | jpg | png | webp | Output format |
/api/v1/compressCompress an image toward a target file size or quality level.
| Parameter | Type | Description |
|---|---|---|
| quality | 1–100 | JPEG/WebP quality (default: 82) |
| target_kb | number | Target size in KB (auto-tunes quality) |
| format | jpg | webp | Output format |
/api/v1/convertConvert between formats without re-sampling.
| Parameter | Type | Description |
|---|---|---|
| format | jpg | png | webp | Target format (required) |
| background | hex color | Fill for PNG → JPG transparency |
/api/v1/remove-bgAI background removal — returns a transparent PNG.
| Parameter | Type | Description |
|---|---|---|
| model | auto | portrait | product | Model 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.