Image Optimization API
Developer API Access
Integrate our image optimization tools directly into your applications with our REST API.
Features
- Compress JPEG, PNG, and WebP images
- Convert between image formats
- Resize and crop images on the fly
- Adjust quality and compression settings
- Secure API key authentication
Usage Limits
- Free tier: 100 requests/month
- Pro tier: 10,000 requests/month
- Enterprise: Custom limits
- Rate limit: 10 requests/second
API Documentation
{
"endpoint": "https://api.imagecalculator.store/v1/compress",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"body": {
"image": "base64_encoded_image_data",
"format": "webp",
"quality": 80,
"options": {
"preserve_metadata": false,
"progressive": true
}
}
}
{
"success": true,
"data": {
"original_size": 1250,
"optimized_size": 450,
"reduction": "64%",
"format": "webp",
"width": 1200,
"height": 800,
"url": "https://cdn.imagecalculator.store/optimized/xyz123.webp",
"expires": "2023-12-31T23:59:59Z"
},
"credits_remaining": 987
}
Getting Started
1 Get API Key
Sign up for a free account to get your API key.
2 Make Request
Send image data to our API endpoint.
3 Receive Results
Get optimized image URL or binary data.
Note: Our API is currently in beta. Endpoints and response formats may change before the stable release.
Frequently Asked Questions
What image formats does the API support?
Our API supports JPEG, PNG, WebP, GIF, and AVIF formats for both input and output (with some limitations for AVIF).
Is there a maximum file size limit?
Yes, the maximum input file size is 25MB for free tier accounts and 100MB for paid accounts.
How are API calls counted?
Each API request counts as one call, regardless of the operation (compression, conversion, etc.). Batch operations are not currently supported.
Where are images stored after processing?
Optimized images are stored on our CDN for 24 hours. For permanent storage, you should download and host the images yourself.
How can I monitor my API usage?
Each API response includes your remaining credits. You can also check your dashboard for detailed usage statistics.