API Documentation
Access Online Image Compressor features programmatically. Use our REST API for automated image optimization in your apps and workflows.
Authentication
To use the API, include your API key in the Authorization
header:
Authorization: Bearer YOUR_API_KEY🔑 Test keys available in dashboard
Example Request
curl -X POST https://api.onlineimagecompress.com/v1/compress \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@example.jpg" \ -o output.jpg
Endpoints
POST /v1/compress
Upload and compress an image.
Parameters: file (multipart/form-data)
Response: optimized image file
POST /v1/batch
Compress multiple images in one request.
Parameters: files[] (multipart/form-data)
Response: zip file with compressed images
GET /v1/status
Check API status and quota usage.
Response: JSON with status and usage info
🔬 Try It Out
Interactive Playground