Developer Portal
POST
/api/v1/compressCompress PDF
Reduce PDF file size by up to 80% while maintaining acceptable visual quality.
Parameters
Content-Type: multipart/form-data
| Name | Type | Required | Description |
|---|---|---|---|
| file | file | required | The PDF file to compress. |
| quality | enum (low | medium | high) | optional | Compression level. low = max compression, high = best quality.Default: medium |
Response
Binary file — compressed.pdf
Content-Type: application/octet-stream
curl
curl -X POST \ https://synthpdf.com/api/v1/compress \ -H "X-API-Key: spdf_your_api_key" \ -F "file=@your-file.pdf" \ -F "quality=medium" \ --output "compressed.pdf"
Error codes
| 401 | Unauthorized | Missing or invalid X-API-Key header. |
| 403 | Forbidden | Your plan does not include API access, or email is unverified. |
| 413 | File too large | Uploaded file exceeds your plan's file size limit. |
| 429 | Rate limited | Exceeded 20 req/min per endpoint, or your plan's daily call limit. |
| 500 | Server error | An internal error occurred while processing the file. |
Try itSign in to run