Send a PDF, get back a smaller one: image recompression and lossless structural cleanup, never touching a signed document.
See the Compress PDF tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger, same endpoint and fields as every tool, with tool="compress-pdf" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@presentation.pdf" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=compress-pdf"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged; a bad value is rejected with 400, not charged and not queued.
| quality | string, optional | "screen", "ebook", "print" (default), or "prepress": a profile trading file size against image fidelity. |
| targetBytes | number, optional | Tries profiles from quality downward until the output is at or below this size; otherwise delivers the smallest result that passed verification, with a warning. |
| stripMetadata | boolean, optional | Default false: remove XMP and the document info dictionary (not the title). |
| removeThumbnails | boolean, optional | Default true: remove page /Thumb images. |
A PDF that's already optimal, signed, or that compression can't safely shrink further is still a success: delivered unchanged, with a warning explaining why, since a result was still produced.
Billed per document: $1 (1 credit) per compressed PDF, regardless of page or image count.
Delivered via the webhook as outcome=failure with a reason below; see the docs index for the full delivery shape.
| encrypted_file | The PDF is password protected. |
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |