SeguraDoc API: Sanitize PDFs for Apps & AI Agents

Introducing the SeguraDoc API: Programmatic PDF Sanitization
The SeguraDoc API lets your backend, script, or AI agent send an untrusted PDF over HTTPS and get back a safe copy — programmatically. It runs on the same isolated pipeline as the SeguraDoc web app: the service transforms untrusted PDFs in isolated processing into safe, inert, OCR-searchable documents rebuilt from page snapshots. It does not claim universal malware or phishing detection. If your product accepts PDFs from users, or your agents ingest PDFs from the web, you can now put a sanitization step between the file and whatever renders or reads it.
Until now, SeguraDoc was something a person used: log in, drop a PDF on the page, download a safe copy. That still works. What’s new is that the same pipeline is now reachable from code through a versioned REST API.
What the API does
You send one input — an untrusted PDF — and the API returns a set of outputs:
- A safe, reconstructed PDF. The document is rebuilt from page snapshots so the copy you get back has no active JavaScript, no embedded files, no launch actions, and no interactive form actions.
- OCR text, per page, for image-based or scanned documents, so the rebuilt file is searchable and its text is machine-readable.
- An AI-generated summary of the document’s content.
- An audit trail of what was processed and charged.
Everything runs inside the same isolated environment the web app uses. For current information about file handling and retention, consult SeguraDoc’s privacy policy and API documentation.
Why a programmatic step matters
Most teams that accept user-uploaded PDFs face the same structural problem: to preview or process a file, their application has to open it — which turns the preview pipeline into an attack surface if the file is hostile.
The API gives you a step you can place between upload and rendering. Send the file to SeguraDoc, receive an inert version rebuilt from snapshots, then show or store that instead of the original. The same pattern applies to AI agents that automatically retrieve PDFs: the agent can be wired to receive only the sanitized output and OCR text, never the raw file.
Pricing model
The API is billed pay-as-you-go in USD. Both AI features (OCR when a document needs it, and the summary) are bundled into the per-document price rather than metered separately, so you see one charge per job.
Because pricing figures differ between SeguraDoc’s product announcements, all specific rates below are listed under Claims needing confirmation and must be verified against the current published pricing before this draft is released.
You can top up a prepaid balance from your dashboard and pay by card, Apple Pay, Google Pay, or cryptocurrency. New accounts receive a small free starter balance to evaluate the service. (Exact top-up range, free-balance amount, and balance validity period are listed under Claims needing confirmation.)
Built for AI agents: x402 support
The API ships with first-class support for x402, the open protocol from Coinbase that lets AI agents pay for individual HTTP requests on demand, without maintaining an account.
The flow is a single round trip: an agent calls the x402 documents endpoint, receives an HTTP 402 response describing the available price bands, picks one, signs an EIP-3009 USDC transfer authorization, and retries the request. SeguraDoc verifies the payment through the x402 facilitator, processes the document, and returns the safe PDF. For agents that don’t know a document’s page count up front, a quote endpoint accepts the file and returns the band that fits before any funds move.
The specific band prices and page thresholds are listed under Claims needing confirmation. The end-to-end integration is documented in the developer docs.
What else shipped for dashboard users
The same release added several capabilities for people using the dashboard directly:
- API keys — issue and revoke bearer tokens from a dedicated API Keys page.
- Outbound webhooks — get notified when a job completes or fails instead of polling. Payloads are signed (HMAC-SHA256), retries follow a fixed back-off schedule, and a deliveries log lets you inspect them.
- Usage ledger — every top-up, charge, and adjustment recorded as an immutable entry you can read via API or browse in the dashboard.
- Per-organization retention — choose how long uploaded PDFs and processed outputs live before deletion.
- Configurable rate limits on the unauthenticated x402 endpoints.
- Developer documentation, including signature-verification examples in Node.js, Python, and Go.
Getting started
If you already have a SeguraDoc account, you have what you need:
- Open API Keys in your dashboard and create a key.
- Add balance from the Usage & Balance page.
- Send your first request with the file attached over HTTPS, receive a job ID, then poll for status or register a webhook for completion.
The Quickstart in the developer docs walks through the full happy path. If you don’t have an account yet, sign up and use the free starter balance to evaluate the service.
What the API does — and doesn’t — do
SeguraDoc’s job is to make an untrusted PDF inert: it rebuilds the document from page snapshots so active content cannot execute in whatever opens the result. It is not marketed as a scanner that detects every piece of malware or every phishing attempt. OCR accuracy varies with scan quality, language, and layout, and the AI summary is a convenience, not a substitute for reading a document when accuracy matters. Treat the sanitized output as a safe-to-handle version of the file, not as a verdict on the sender’s intent.
Try the API
Ready to sanitize PDFs from your own code? Create an API key in your dashboard and follow the Quickstart in the docs — you can process your first document in a few commands.