Image Compress API

Compress, resize, and convert images via REST API. Reduce file size up to 90% while maintaining quality.

<1s
Avg Response
90%
Max Compression
4
Formats (JPEG, PNG, WebP, AVIF)

How It Works

Step 1
Upload Image
Send your image via multipart form data
Step 2
Set Parameters
Choose quality, dimensions, and output format
Step 3
Get Compressed Result
Receive optimized image with compression stats

Playground

๐Ÿ“

Drop image here or click to upload

80
Upload an image and click Compress

API Documentation

Base URL
https://imagecompress-proxy.vercel.app
Authentication
X-API-Key: your_key (header) or ?key=your_key (query) Get your free key below
POST /api/compress

Compress, resize, and optionally convert an image. Returns the processed binary image.

Request (multipart/form-data)

ParameterTypeRequiredDescription
image file yes Image file to compress
quality int no Compression quality 1โ€“100. Default: 80
width int no Resize width in pixels
height int no Resize height in pixels
format string no Output format: jpeg, png, webp, avif. Default: original
fit string no Resize fit: cover, contain, fill, inside. Default: cover

Response

Body
Binary image data
Headers
X-Original-Size โ€” original file size in bytes
X-Compressed-Size โ€” compressed file size in bytes
X-Compression-Ratio โ€” compression percentage
X-Output-Width โ€” output image width
X-Output-Height โ€” output image height
POST /api/info

Get metadata about an image without compressing it.

Request (multipart/form-data)

ParameterTypeRequiredDescription
image file yes Image file to inspect

Response (JSON)

{
  "width": 1920,
  "height": 1080,
  "format": "jpeg",
  "mode": "RGB",
  "size_bytes": 245780
}

Error Responses

// 400 โ€” Bad Request
{ "error": "Invalid image or file too large" }

// 401 โ€” Unauthorized
{ "error": "Invalid API key" }

// 429 โ€” Rate Limited
{ "error": "Daily limit reached. Upgrade your plan." }

Get API Key

Get a free API key for 6 requests/day. No credit card required.

Usage

  • Add header: X-API-Key: your_key
  • Or query param: ?key=your_key

Limits

  • Playground (no key): 3 req/day
  • Free tier (with key): 6 req/day
  • Paid plans: see pricing below

Pricing

Start free. Pay only when you need more.

Free
$0
  • 6 requests/day
  • Max 5MB file size
  • JPEG, PNG, WebP
  • Basic compression
Starter
๐Ÿš€ Launch Price
$15$7/mo
  • 300 requests/day
  • Max 10MB file size
  • All formats (+ AVIF)
  • Resize support
Business
๐Ÿš€ Launch Price
$99$49/mo
  • 8,000 requests/day
  • Max 10MB file size
  • All formats
  • Priority support
Pay as You Go

No monthly commitment. Pay only for what you use. All features included.