PDF Squeezer API Sign Up

Endpoints

Single endpoint for PDF compression.

POST /api/v1/compress

Upload a PDF and receive the compressed file. Request: multipart/form-data with file and optional query/form parameters.

Parameters

quality

Image compression quality 1–100. Default: 75. Higher values = better image quality, larger file. Use 80–90 for documents with photos.

maxDimension

Max width or height in pixels for embedded images. Default: 1200. Larger images are downsampled to reduce file size.

stripMetadata

Remove EXIF and other metadata. Default: true. Use true for compliance or when metadata is not needed.

convertToJpeg

Convert embedded images to JPEG for smaller size. Default: true. Disable if you need PNG/other formats preserved.

NameTypeDefaultDescription
filefilePDF file (required)
qualityint75Image compression quality 1–100
maxDimensionint1200Max width/height for images
stripMetadatabooltrueRemove EXIF and other metadata
convertToJpegbooltrueConvert images to JPEG for smaller size

Response headers

X-Compression-Ratio — size reduction ratio (e.g. 0.65 = 35% smaller).

curl -X POST https://api.pdfsqueezer.io/v1/compress \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "quality=85" \
  -F "maxDimension=1600" \
  -F "stripMetadata=true" \
  -F "convertToJpeg=true" \
  -o compressed.pdf

Authentication · Errors · Docs index