Back to Tool
🖼️
Image Compressor API
Compress images via API with configurable quality settings
Endpoint
POST
/api/v1/image-compressorAuthentication
Include your API key in the request header:
X-API-Key: your_api_key_hereGet your API key from the Dashboard
Request Body
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| image | file | Yes | Image file to compress (JPEG, PNG, or WebP) |
| quality | number | No | Compression quality from 0-100 (default: 80) |
Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the compression was successful |
| originalSize | number | Original file size in bytes |
| compressedSize | number | Compressed file size in bytes |
| compressionRatio | number | Compression ratio as percentage |
| format | string | Image MIME type |
| image | string | Base64 encoded compressed image with data URL prefix |
Code Examples
curl -X POST https://tools.shubhambadgujar.com/api/v1/image-compressor \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/image.jpg" \
-F "quality=75"Rate Limits
- • 100 requests per minute
- • 10,000 requests per day
- • Max request size: 10MB
Need Help?
Contact us at support@shubhambadgujar.com