Presswork API · v1

Restricted HTML to PDF

The API accepts your self-contained HTML and waits for an owned terminal result. Successful PDFs remain available for no more than 24 hours.

From trial to your first integration

  1. Try your own HTML free. Check the downloaded PDF before buying.
  2. Buy the $39 non-renewing pass when checkout is available. The verified receipt page issues your private API key once.
  3. Save the key in a server-side environment variable. Never embed it in a website, app bundle or public repository.
  4. Run an example below. Keep the same Idempotency-Key only when retrying the same document; use a new key for the next document.

For a lost key, revisit your checkout receipt in the same browser and choose Replace lost API key. This revokes the old key immediately without extending quota or expiry. Clearing the browser’s ownership cookie prevents automatic recovery; contact the seller using your receipt.

Quickstart

curl -X POST https://pdf.keeep.app/v1/renders \
  -H "Authorization: Bearer $PRESSWORK_KEY" \
  -H "Idempotency-Key: invoice-1042" \
  -H "Content-Type: application/json" \
  --data '{"html":"<h1>Invoice 1042</h1>","format":"A4","landscape":false}'
# The terminal response includes downloadUrl on success:
curl -H "Authorization: Bearer $PRESSWORK_KEY" \
  "https://pdf.keeep.app/v1/renders/JOB_ID?download=1" -o invoice.pdf

POST is deliberately synchronous in V1-local and returns 200 after a terminal succeeded or failed result. A concurrent duplicate can return 409 while the original request owns its short lease. Use the same API key with GET /v1/renders/:id to retrieve status later; append ?download=1 only after success.

Request contract

htmlstring · required

UTF-8 HTML with inline CSS and embedded raster images.

formatA4 | Letter

No silent paper-size fallback.

landscapeboolean

Required explicit orientation.

Idempotency-Key is required for paid API calls. Reusing a key with identical content returns the original job without another quota use; different content returns 409 IDEMPOTENCY_CONFLICT.

Restrictions

Allowed: semantic HTML, inline CSS, tables, print backgrounds, page breaks, embedded PNG/JPEG/WebP images, and the renderer’s bundled Noto/Liberation fonts.

Rejected: JavaScript, event handlers, forms, frames, SVG, media, file URLs, HTTP(S) URLs, CSS imports, remote fonts and browser automation.

Typed errors

  • INVALID_FORMAT — paper format is not A4 or Letter
  • EXTERNAL_RESOURCE — markup references a network or file resource
  • HTML_TOO_LARGE / IMAGES_TOO_LARGE — input crosses a documented bound
  • TOO_MANY_PAGES / RENDER_TIMEOUT — output crosses a runtime bound
  • SUCCESS_LIMIT / ATTEMPT_LIMIT — pass quota or protective attempt limit reached

Privacy and retention

Results are private to the API key that created them and expire after 24 hours. The metadata store records status, timestamps and quota—not HTML, document titles, plaintext keys or source URLs. Rendering is isolated with networking disabled. Playground drafts remain in your browser; use Reset sample to replace your draft. Trial abuse limits store rotating keyed address hashes. A startup and once-a-minute cleanup keeps only the current and previous UTC day's buckets while the service runs, even when trials are disabled. Do not submit documents you do not have permission to process. The metadata store does not yet have a verified general deletion period.

The browser trial has three successful renders, with additional per-address and global daily protection. Use synthetic or non-personal HTML for this free preview. Paid passes include 5,000 successes in 30 days; failed attempts do not use successful-render quota. Allow up to 35 seconds for a request including worker cleanup.

For an issue, lost key or refund request, contact help. Do not include an API key, document contents, card details or private customer data in the form. Personal-data-bearing customer documents require a separate data processing agreement before use; read the privacy notice.