REST API · Self-hosted · Credit-based

The PDF & document API
you can own.

Convert, merge, split, OCR, parse and barcode-scan documents with one JSON API. OpenPDF is a complete, self-hosted PDF.co-style platform — your server, your data.

28API endpoints
PDF.cocompatible conventions
1 hrtemp file auto-cleanup
POST /v1/pdf/convert/to/text
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/text \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/invoice.pdf",
       "inline": true}'
{
  "body": "INVOICE INV-2026-0042 ...",
  "url": "https://pdf.rochlabs.online/f/9c1d.../invoice.txt",
  "pageCount": 2,
  "credits": 4, "remainingCredits": 61236,
  "error": false, "status": 200
}

Everything PDF, one API

Every operation follows the same request/response contract: send JSON with a file url, get back a result url — or run it async with job/check polling and webhooks.

Convert from PDF

  • /v1/pdf/convert/to/textExtract plain text from a PDF (layout-aware).
  • /v1/pdf/convert/to/jsonStructured JSON: per-page text, dimensions and detected tables.
  • /v1/pdf/convert/to/csvDetected tables as CSV (falls back to text lines).
  • /v1/pdf/convert/to/xmlXML document with per-page text nodes.
  • /v1/pdf/convert/to/htmlSimple HTML rendition of the PDF text.
  • /v1/pdf/convert/to/imageRender pages to PNG/JPG/WEBP/TIFF images.

Convert to PDF

  • /v1/pdf/convert/from/htmlHTML string or web page URL to PDF.
  • /v1/pdf/convert/from/urlAlias of from/html for web pages.
  • /v1/pdf/convert/from/imageOne or more images (JPG/PNG/WEBP/TIFF) into a single PDF.

Edit & organize

  • /v1/pdf/mergeMerge PDFs (and images) into one document.
  • /v1/pdf/splitSplit by page ranges; each comma token becomes one output PDF.
  • /v1/pdf/edit/rotateRotate pages by 90/180/270 degrees.
  • /v1/pdf/edit/delete-pagesRemove pages from the document.
  • /v1/pdf/edit/addStamp text, watermarks and images onto pages (top-left coordinates).
  • /v1/pdf/edit/fillFill AcroForm fields ({fieldName: value}).
  • /v1/pdf/optimizeCompress a PDF (lossless; or rasterize=true for maximum reduction).

Security & OCR

  • /v1/pdf/security/addEncrypt with user/owner passwords (AES-256).
  • /v1/pdf/security/removeRemove password protection (requires the password).
  • /v1/pdf/makesearchableOCR scanned pages into a searchable PDF (tesseract).
  • /v1/pdf/makeunsearchableRasterize pages so text cannot be selected or extracted.

Extract & parse

  • /v1/pdf/infoMetadata, page count, encryption and form detection.
  • /v1/pdf/findFind text (or regex) with page + coordinates of each match.
  • /v1/pdf/documentparserTemplate-driven field extraction (regex templates) or automatic key/value sweep.
  • /v1/ai-invoice-parserInvoice fields (number, dates, totals, tax, IBAN…) without a template.
  • /v1/pdf/forms/infoList fillable form fields with types, values and options.
  • /v1/pdf/attachments/extractExtract embedded file attachments.

Barcodes

  • /v1/barcode/generateGenerate QR / Code128 / EAN13 / UPC-A... as PNG.
  • /v1/barcode/readRead barcodes/QR from an image or PDF pages.

Built like the real thing

Async job engine

Pass "async": true and poll /v1/job/check, or give a callback URL and get webhooked when the document is ready.

Credit metering

Every operation bills base + per-page credits against your monthly plan, with live remainingCredits in each response.

Expiring file links

Results live on signed links that expire per your plan (60 min – 24 h), with automatic disk cleanup.

Presigned uploads

Three ways in: multipart upload, presigned PUT URLs, or pull from any public URL / base64.

Simple, credit-based pricing

Billing is simulated in self-hosted mode — switch plans freely from the dashboard.

Free

Free
  • 1,000 credits / month
  • Result links valid 60 min
  • Full API access
  • Async jobs + webhooks
Choose Free

Basic

$8.99/mo
  • 16,500 credits / month
  • Result links valid 60 min
  • Full API access
  • Async jobs + webhooks
Choose Basic

Personal

$22.49/mo
  • 37,000 credits / month
  • Result links valid 60 min
  • Full API access
  • Async jobs + webhooks
Choose Personal

Business 2

$89.99/mo
  • 159,850 credits / month
  • Result links valid 1440 min
  • Full API access
  • Async jobs + webhooks
Choose Business 2

Business 3

$270.0/mo
  • 483,000 credits / month
  • Result links valid 1440 min
  • Full API access
  • Async jobs + webhooks
Choose Business 3