Compress Document
Compress a PDF document to reduce its file size and return a temporary download URL.
Required scopes (OAuth 2.0)
Required scopes (OAuth 2.0)
pdf:filesAuthorizations
Provide your API key in the X-API-Key header, e.g., X-API-Key: YOUR_API_KEY.
Body
Compression level.
standard— ~150 dpi images, removes non-essential bookmarks and unused metadata. Targets ≥ 30% file size reduction.maximum— ~72–96 dpi images, strips all non-essential content. Targets ≥ 60% file size reduction. Requires Pro / Business plan.
standard, maximum Lumin document ID of the PDF to compress.
Required when file_url is not provided. Takes priority if both are provided.
To obtain a document ID, upload the file to Lumin first using Upload Document.
Publicly accessible URL of the PDF file to compress.
Required when document_id is not provided. Ignored if document_id is also provided.
Name of the compressed output file. Defaults to compressed_{original document name}.
1 - 255Advanced compression settings. Only applicable when compression_level is maximum.
Response
Returns a temporary download URL for the compressed PDF.