Skip to content
Browse all functions

Compress PDF – Reduce PDF File Size

files/compresspdf

compresspdf (Compress PDF – Reduce PDF File Size) is a 1001fx API function in the group Files & PDF: POST https://api.1001fx.com/files/compresspdf, 3 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

3 credits per callHTTP APIMake

Makes a PDF smaller by downsampling images and removing duplicates (Ghostscript). If the result would be larger, the original is returned. The original size and the new size are in the headers x-fx-original-size and x-fx-compressed-size.

Endpoint

POSThttps://api.1001fx.com/files/compresspdf
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
multipart/form-data

Parameters

  • filefileoptional

    The PDF. Either file or fileUrl.

  • fileUrlstringoptional

    Public URL of the PDF. Either file or fileUrl.

    Example:
    https://api.1001fx.com/testdata/3pages.pdf
  • levelenumoptional

    screen: smallest (72 dpi images), ebook: small (150 dpi, default), printer: 300 dpi, prepress: highest quality.

    Values:
    screen
    ebook
    printer
    prepress
    Default:
    ebook

Examples

Compress PDF – Reduce PDF File Size

Compress PDF – Reduce PDF File Size

Input

Expects multipart/form-data or a json body
{
  "fileUrl": "https://api.1001fx.com/testdata/3pages.pdf",
  "level": "ebook"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/files/compresspdf' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'

Step-by-step guides

Try compresspdf now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.001.11.2026created