PDF API for developers and AI agents
Use the separate PDFit API when an application or agent needs to assemble PDF pages programmatically. The current API has one operation, PDF merge and page assembly, and it is free to use.
Hosted processing, not browser-local processing: PDFs sent to this API are uploaded for server-side processing. Use the browser tools instead when documents must stay on the device.
What happens to uploaded files
- Files are parsed in memory for the single request that carried them.
- No document content is written to storage, and the API provides no retrieval or recovery.
- The endpoint does not log document contents, filenames, or page data.
- Responses are marked
Cache-Control: no-store. - Cloudflare, as the hosting provider, processes the request to deliver it and may retain ordinary technical request metadata such as status codes under its own policies.
Available now: merge and assemble PDF pages
- Endpoint:
POST https://pdfit-api-production.zachary-matus.workers.dev/v1/pdf/merge - Input: two to ten PDF files as multipart form fields named
files - Limits: 25 MiB combined input; 10 MiB per file; 100 merged pages
- Output: an
application/pdfresponse in submitted document order by default;X-PDFit-Page-Countreports the page count andX-PDFit-Processing-Modereportshosted - Validation: malformed and encrypted PDFs are rejected, and the returned PDF is reopened before it is sent
- Availability check:
GET /healthreportsprocessing,storage, and the enforced limits - Rate limit: about 30 requests per 10 minutes per client. Exceeding it returns
429with aRetry-Afterheader. Over-limit responses are not cached and no document data is logged.
Cost: free. There is no payment step, wallet, account, or API key. Limits still apply, and free access may change as the service evolves.
Request format
Submit each source as a multipart files field. Files are numbered in that field order, starting at zero. To preserve all pages in source order, omit pageReferences.
To select, reorder, omit, or duplicate pages, submit exactly one pageReferences field containing a non-empty JSON array. Each reference has zero-based fileIndex and pageIndex; the array is the exact output order.
curl -X POST https://pdfit-api-production.zachary-matus.workers.dev/v1/pdf/merge \
-F "files=@alpha.pdf;type=application/pdf" \
-F "files=@bravo.pdf;type=application/pdf" \
-F 'pageReferences=[{"fileIndex":1,"pageIndex":0},{"fileIndex":0,"pageIndex":1},{"fileIndex":0,"pageIndex":1}]' \
-o assembled.pdf
The request returns the merged PDF directly. There is no payment step, so a plain multipart request is all that is required.
const form = new FormData()
form.append('files', alphaFile)
form.append('files', bravoFile)
form.append('pageReferences', JSON.stringify([
{ fileIndex: 1, pageIndex: 0 },
{ fileIndex: 0, pageIndex: 1 },
]))
const response = await fetch(endpoint, { method: 'POST', body: form })
// response.ok and response.headers.get('content-type') is application/pdf.
Integration documentation
Download or reference the OpenAPI 3.1 description for endpoint, request, response, and error details.
Current scope
Only PDF merge and page assembly are available through the hosted API. Editing, compression, conversion, and signatures are browser-only and are not API endpoints. Do not represent planned features as available.
Request an API feature
Send use cases and requested operations to support@pdfit.net. Do not send PDFs, document contents, or credentials by email.