API

Stirling PDF's tools, as an API

Convert, OCR, redact, sign and split PDFs from your own code. Call the API on Stirling Cloud or on a server you host.

A POST request to /api/v1/misc/ocr-pdf with scan.pdf, and searchable.pdf back in the response.

Fig. 1 — /api/v1/misc/ocr-pdf

What you get

  1. An endpoint for each server-side tool

    Send a file as multipart/form-data and the response is the processed file.

  2. Cloud or your own server

    Call the API at api.stirling.com, or on a server you host. A self-hosted server lists the endpoints its build has at /swagger-ui/index.html.

  3. Credits by the file

    On Stirling Cloud, each file processed uses one credit, and very long or very large files can use more. A file run through several steps of one Pipeline counts once. A self-hosted server has its own monthly processing allowance.

Capabilities

Convertmultipart/form-data
  1. Markdown

    PDF to Markdown

    From PDF
  2. Word

    PDF to Word

    From PDF
  3. Excel

    PDF to Excel

    From PDF
  4. Email

    Email to PDF

    To PDF
Fig. 2 — Convert

Convert

PDF to Markdown, text, HTML, XML, Word, CSV and Excel. Documents, images, HTML, Markdown and email to PDF.

OCRscan.pdf
  1. Languages

    Choose the languages

    eng
  2. Straighten

    Straighten pages

    On
  3. Clean

    Clean pages

    On
  4. Skip text pages

    Skip pages that already have text

    On
Fig. 3 — OCR

OCR

Make scanned PDFs searchable. Choose the languages, straighten and clean pages, and skip pages that already have text.

Security and signingX-API-KEY
  1. Redact

    Matching text

    Security
  2. Sanitise

    Sanitise the PDF

    Security
  3. Passwords

    Add or remove

    Security
  4. Sign

    With a certificate

    Signing
  5. Validate

    Signatures

    Signing
Fig. 4 — Security and signing

Security and signing

Redact matching text, sanitise, add or remove passwords, sign with a certificate and validate signatures.

PipelineOne call
  1. PDF files

    Sent with a list of operations

    In
  2. Operations

    Run as one Pipeline

    Steps
  3. One file

    Returned as a file

    Out
  4. Several files

    Returned as a ZIP

    Out
Fig. 5 — Pipeline

Pipelines in one call

Send PDF files and a list of operations. Stirling runs them as one Pipeline and returns a file, or a ZIP when there are several.

AI toolsJSON
  1. Classify

    Invoice, receipt, contract or another type

    Metadata
  2. Check arithmetic

    The discrepancies it finds

    JSON
  3. Self-hosted

    Off until an administrator turns it on

    Admin
Fig. 6 — AI tools

AI tools

Classify a document as an invoice, receipt, contract or another type, and store the label in its metadata. Check the arithmetic in a PDF and get the discrepancies it finds back as JSON. On a self-hosted server, AI is off until an administrator turns it on.

Document chunksJSONL
  1. Markdown

    The document as Markdown

    Export
  2. JSONL

    One chunk per line

    Export
  3. Page span

    On each chunk

    Chunk
  4. Headings

    On each chunk

    Chunk
Fig. 7 — Document chunks

Document chunks

On a self-hosted server with the AI engine running, export a document as Markdown, or as JSONL with one chunk per line, each with its page span and headings.

How it works

  1. Create a key

    Create an API key and send it on every request in the X-API-KEY header.

  2. /api/v1/misc/ocr-pdf

    POST

    Send a file

    POST the file as multipart/form-data to the tool's endpoint.

  3. Response

    • searchable.pdfProcessed file
    • ?async=trueJob ID

    Get the result

    The response is the processed file. Add ?⁠async=true to get a job ID back instead of the file.

curl --fail -X POST https://api.stirling.com/api/v1/misc/ocr-pdf \
  -H "X-API-KEY: $STIRLING_API_KEY" \
  -F "fileInput=@scan.pdf" \
  -F "languages=eng" \
  -o searchable.pdf
Customer stories

The PDF editor engineers and IT teams recommend

Read all studies
VMware logo
Vikash Jhagroe
“This is the one PDF Editor to rule them all! My quest for the perfect PDF editor finally paid off. Meet Stirling PDF, the only PDF editor you will ever need.”

Vikash Jhagroe

Sr Technical Adoption Manager, VMware

Aramark logo
3D AI Studio logo

Have questions?
Find answers.

Stirling edits, converts, signs and redacts PDFs, and its pipelines run the same steps on every document that arrives. Use it in the browser, on the desktop, or on your own servers.

Ready to edit your first PDF?

Free for individuals. Use it in your browser, install it on Windows, macOS or Linux, or self-host it with Docker.