{"slug":"format-halowerk-com-v1-pdf-compress-to-size-e2fc01","title":"Compress a PDF towards a target size without crossing your readability limit","host":"format.halowerk.com","method":"POST","resource":"https://format.halowerk.com/v1/pdf-compress-to-size","category":"image","description":"Compress a PDF towards a target size without crossing your readability limit: images are resampled to the lowest effective resolution and JPEG quality you allow, streams are packed losslessly, and page count and text are verified unchanged. Measures the largest placed size of every image XObject fro","price_listed":0.005,"price_asked":0.005,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":1191,"reported_calls_30d":2,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"content_base64":"JVBERi0xLjcKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvQWNyb0Zvcm08PC9GaWVsZHNbNCAwIFIgNSAwIFJdPj4+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL01lZGlhQm94WzAgMCAzMDAgMjAwXS9Bbm5vdHNbNCAwIFIgNSAwIFJdPj4KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dpZGdldC9GVC9UeC9UKG5hbWUpL1RVKEZ1bGwgbmFtZSkvTWF4TGVuIDQwL0ZmIDIvUmVjdFsyMCAxNTAgMjIwIDE2OF0vUCAzIDAgUj4+CmVuZG9iago1IDAgb2JqCjw8L1R5cGUvQW5ub3QvU3VidHlwZS9XaWRnZXQvRlQvQ2gvVChjb3VudHJ5KS9GZiAxMzEwNzIvT3B0WyhERSkoQVQpKENIKV0vVihERSkvRFYoREUpL1JlY3RbMjAgMTIwIDgwIDEzOF0vUCAzIDAgUj4+CmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA4NyAwMDAwMCBuIAowMDAwMDAwMTM4IDAwMDAwIG4gCjAwMDAwMDAyMjMgMDAwMDAgbiAKMDAwMDAwMDM0MSAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgNi9Sb290IDEgMCBSPj4Kc3RhcnR4cmVmCjQ3MwolJUVPRgo=","target_bytes":100000},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"content_base64":{"description":"The PDF as base64 (a data: prefix and whitespace are tolerated); at most 10 MB decoded.","maxLength":13981016,"minLength":8,"type":"string"},"drop_thumbnails":{"default":true,"description":"Remove embedded page thumbnails (viewers regenerate them).","type":"boolean"},"lossy":{"default":true,"description":"Allow converting lossless (Flate) images to JPEG when that is smaller.","type":"boolean"},"min_jpeg_quality":{"default":60,"description":"Readability limit: JPEG quality (libjpeg scale) is never set below this value.","maximum":95,"minimum":40,"type":"integer"},"min_ppi":{"default":150,"description":"Readability limit: images are never resampled below this effective resolution.","maximum":600,"minimum":72,"type":"integer"},"target_bytes":{"description":"Desired maximum file size in bytes.","maximum":10485760,"minimum":1000,"type":"integer"},"url":{"description":"Public http(s) URL of the PDF (at most 10 MB). Private, local and reserved addresses are refused.","format":"uri","maxLength":2048,"type":"string"}},"required":["target_bytes"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1221,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1184,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1202,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1191,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1204,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1179,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1191,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1133,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":320,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":379,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":354,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":324,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":349,"error":null},{"day":"2026-11-13","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":354,"error":null}],"description_full":"Compress a PDF towards a target size without crossing your readability limit: images are resampled to the lowest effective resolution and JPEG quality you allow, streams are packed losslessly, and page count and text are verified unchanged. Measures the largest placed size of every image XObject from the page content (pdf-lib 1.17.1 plus own content interpreter) and derives its effective resolution.","last_updated":"2026-11-20T19:07:15.093Z","schemes":["exact"]}