editpdf.tools · Compress PDF API

Compress PDF API

Compress PDF files from your own app, Zapier-style automations or scripts. Files are processed on our server and deleted right after the response. Nothing is stored.

Free plan

Get a free API key · Dashboard

Example

curl -X POST https://api.editpdf.tools/v1/compress \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@input.pdf" -F "level=recommended" \
  -o compressed.pdf

Response: the compressed PDF. Headers X-Original-Size, X-Compressed-Size, X-Quota-Remaining. Errors are JSON.

Check your key: GET /v1/me with the same header.

Source code (AGPL-3.0). Uses Ghostscript (AGPL, Artifex Software). Support: editpdf.tools/contact