Step 1: Validate the key
UsePOST /validate before sending files if you want to confirm the key and inspect the remaining credits.
Step 2: Compress an image
Send the image asmultipart/form-data. The request must include:
api_keyfile
Step 3: Decode compressed_data
The API returns the compressed file as base64.
Notes
- Only successful compressions consume credits.
- The file size limit is
10 MB. - Supported MIME types are
image/png,image/jpeg,image/webp, andimage/avif.