Skip to content
Fourohtwo

format.halowerk.com/v1/pdf-compress-to-size

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 resolutio

BaseAnswering
POSThttps://format.halowerk.com/v1/pdf-compress-to-size

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://format.halowerk.com/v1/pdf-compress-to-size", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"content_base64":"JVBERi0xLjcKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvQWNyb0Zvcm08PC9GaWVsZHNbNCAwIFIgNSAwIFJdPj4+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL01lZGlhQm94WzAgMCAzMDAgMjAwXS9Bbm5vdHNbNCAwIFIgNSAwIFJdPj4KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dpZGdldC9GVC9UeC9UKG5hbWUpL1RVKEZ1bGwgbmFtZ),
});
console.log(await res.json());

Example input

{"content_base64":"JVBERi0xLjcKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvQWNyb0Zvcm08PC9GaWVsZHNbNCAwIFIgNSAwIFJdPj4+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL01lZGlhQm94WzAgMCAzMDAgMjAwXS9Bbm5vdHNbNCAwIFIgNSAwIFJdPj4KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dpZGdldC9GVC9UeC9UKG5hbWUpL1RVKEZ1bGwgbmFtZ