Skip to content
Seal
Esc
↑↓navigate↵open⌘Jpreview

Compress a draft PDF in place

Re-encodes embedded images to JPEG via the convert-worker PDF engines (qpdf/pdfcpu — not Seal AI). Text, vectors, fonts, and structure are untouched; the engine never enlarges the file. Fields are unaffected. Honours the org egress.allow_convert gate since bytes leave the API worker for the conversion container.

POST/documents/pdf/compress
Authorization
AuthorizationBearer token · headerrequired

Pass your API key as a Bearer token. API keys are scoped to specific operations — configure scopes in your organization's Settings → Developer → API Keys.

Request body
requiredapplication/json
idstringrequired
image_qualityinteger

JPEG quality for re-encoded images (default 80)

min 1 · max 100
Responses
200

Compressed

successboolean
storage_idstring
page_countinteger
size_beforeinteger
size_afterinteger
403

Org egress disallows conversion

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://api.seal.nyc/api/v1/documents/pdf/compress" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string",
  "image_quality": 1
}'
Response
{
  "success": true,
  "storage_id": "string",
  "page_count": 0,
  "size_before": 0,
  "size_after": 0
}