iLoveToolkit
REST API · v1

API Documentation

Integrate iLoveToolkit's PDF, image, and Word processing into your own apps. All endpoints return JSON and accept multipart/form-data.

Get API key
POST/pdf/compress

Compress PDF

Reduce the file size of a PDF by downsampling images and removing redundant objects. Returns a download URL valid for 24 hours.

Request body

ParameterTypeRequiredDescription
filefileYesThe PDF file to compress (multipart/form-data).
qualitystringNoCompression level: `low`, `medium` (default), or `high`.

Request

Language

bash
curl -X POST https://api.ilovetoolkit.com/v1/pdf/compress \
  -H "Authorization: Bearer <token>" \
  -F "file=@document.pdf" \
  -F "quality=medium"

Response

json
{
  "job_id": "job_01j9xkz2b3",
  "status": "completed",
  "output": {
    "url": "https://cdn.ilovetoolkit.com/output/job_01j9xkz2b3.pdf",
    "filename": "document_compressed.pdf",
    "size_bytes": 312400,
    "original_size_bytes": 1048576,
    "reduction_percent": 70.2,
    "expires_at": "2026-08-10T10:32:00Z"
  }
}

Ready to build?

Get your API key and start integrating in minutes.