Skip to main content

Step 1: Validate the key

Use POST /validate before sending files if you want to confirm the key and inspect the remaining credits.
Example response:

Step 2: Compress an image

Send the image as multipart/form-data. The request must include:
  • api_key
  • file
Example response:

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, and image/avif.