Three APIs, one contract
Learn one and you know the rest: the same auth header, the same request shape, and a response that states what the job did and what it cost.
-
PDF Compression
Shrinks a PDF by resampling each image to the size it is shown at on the page.
POST /v1/pdf/compressMeasured59 pages, 27.2 MB down to 5.1 MB in about 11 seconds.
Price$0.02 up to 25 MB
$0.04 up to 200 MB -
Image Optimization
Resize and convert phone photos to JPEG, WebP or PNG, one at a time or 250 per batch.
POST /v1/image/optimizePOST /v1/image/batchMeasuredA batch of 250 images finished in 23 seconds for $0.20.
Price$0.0008 per image, single or batch
-
Worked example
5,000 rows by 18 columns is 90,000 cells, which comes to $0.0068.
Price$0.005 per file
plus $0.00002 per 1,000 cells
The shared contract
Every endpoint takes a source, which is a URL, a base64 string or the id of a file you uploaded,
plus an options object for that service. Long jobs can run in the background with mode: "async"
and report to a webhook when they finish.
Every result reports the work and the charge together. stats carries the original size, the
output size and the ratio; billing.charged_micros carries the cost in millionths of a dollar.
Send an Idempotency-Key header and a retried workflow never pays twice for the same job.
When you are not charged
The PDF could not be made smaller. You get your original file back.
$0.00The optimized image came out no smaller than the source. It is still returned.
$0.00An image in a batch failed. You pay for the ones that succeeded.
$0.00Your request was invalid. Any 4xx.
$0.00Something broke on our side. Any 5xx.
$0.00
Access is by request while self-serve sign-up is being built.