BiGapiguides
POST /v1/pdf/sanitize · 1 cent per operation

Sanitize PDF

Strip the invisible: JavaScript actions, open-actions, form fields and embedded files are removed and the file is rewritten, so orphaned objects are gone too. The counterpart to redact before handing a document out.

Try it

curl -X POST https://api.bigapi.dev/v1/pdf/sanitize -H 'Authorization: Bearer $KEY' -F 'file=@case-file.pdf' -o clean.pdf

New keys come with 100 free operations, no signup: curl -X POST https://api.bigapi.dev/v1/keys. Failed calls cost nothing.

Parameters

NameMeaning
file requiredPDF to clean of JavaScript, auto actions, form fields and attachments.
flattentrue bakes form fields and comments into the page so what they show stays visible but nothing is interactive any more.
Default: true
removeAttachmentstrue removes embedded files, which can carry malware or hidden data.
Default: true
removeMetadatatrue also clears title, author and producer, e.g. before publishing.
Default: false

Result and price

1¢ · 1 cent per operation

Returns application/pdf. Response headers carry the cost (X-BigAPI-Cost) and notes about your input (X-BigAPI-Warnings).

From an agent (MCP)

Connect BiGapi as an MCP server: https://api.bigapi.dev/mcp (hosted) or npx -y @bigapi/mcp (local). Then ask in plain words; the agent finds pdf_sanitize on its own.