canonical: https://jentic.com/apis/pdf.co/pdf-co

# PDF.co API

PDF.co API provides document processing capabilities including AI-powered invoice parsing, PDF conversion to and from multiple formats (CSV, JSON, XML, HTML, PNG), PDF merge and split operations, barcode generation and reading, and file upload management. The API handles both synchronous processing for small files and asynchronous job-based processing for large documents, with results delivered via URL download links.

## For AI agents

Convert PDFs to CSV, JSON, XML, and images, parse invoices with AI, merge and split documents, and generate or read barcodes from uploaded files.

## Scope

Does not handle document signing, form filling, or OCR on handwritten text - use for format conversion, structured extraction, and barcode operations only.

## Capabilities

- Parse invoices and receipts with AI to extract structured line-item data
- Convert PDF documents to CSV, JSON, XML, HTML, and PNG formats
- Generate PDF files from HTML content with custom styling
- Merge multiple PDF files into a single consolidated document
- Split PDF documents into individual pages or page ranges
- Generate barcodes in multiple formats (QR, Code128, EAN, UPC)
- Read and decode barcodes from images and PDF documents

## Use cases

### AI Invoice Parsing

Extract structured data from invoices and receipts using AI-powered document understanding. The POST /ai-invoice-parser endpoint accepts a PDF or image URL and returns parsed fields including vendor name, invoice number, date, line items with quantities and amounts, tax totals, and payment terms. This eliminates manual data entry for accounts payable automation and expense management workflows.

Example prompt: Upload an invoice PDF via POST /file/upload, then parse it via POST /ai-invoice-parser with the uploaded file URL to extract vendor name, invoice number, and line items

### PDF Format Conversion

Convert PDF documents to machine-readable formats for downstream processing. The API supports conversion to CSV (for tabular data), JSON (for structured extraction), XML (for system integration), HTML (for web display), and PNG (for image rendering). Each conversion endpoint accepts a source URL and returns a download link for the converted output.

Example prompt: Convert a PDF containing a data table to CSV format via POST /pdf/convert/to/csv with the source URL and return the download link for the resulting CSV file

### Document Assembly and Splitting

Merge multiple PDF files into a single document or split large PDFs into smaller files. The POST /pdf/merge2 endpoint accepts an array of source URLs and produces a combined PDF. POST /pdf/split separates a document by page ranges. These operations enable document workflow automation for contracts, reports, and multi-part submissions.

Example prompt: Merge three PDF files by providing their URLs to POST /pdf/merge2 and return the download URL for the combined document

### AI Agent Document Processing via Jentic

AI agents use the PDF.co API through Jentic to parse invoices, convert documents, and extract data without managing API keys directly. Agents search by intent, receive typed schemas for document operations, and execute calls with Jentic handling the x-api-key header injection. This enables automated document workflows in accounting, legal, and data pipeline contexts.

Example prompt: Search Jentic for 'parse invoice from PDF', load the schema for POST /ai-invoice-parser, and execute with the invoice URL to extract structured payment data

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /ai-invoice-parser | Parse invoices with AI extraction |
| POST | /pdf/convert/to/csv | Convert PDF to CSV format |
| POST | /pdf/convert/to/json | Convert PDF to JSON format |
| POST | /pdf/convert/from/html | Generate PDF from HTML |
| POST | /pdf/merge2 | Merge multiple PDFs into one |
| POST | /pdf/split | Split PDF into pages |
| POST | /barcode/generate | Generate a barcode image |
| POST | /barcode/read/from/url | Read barcodes from an image URL |

## Key resources

- **AI Invoice Parser** — Extract structured data from invoices using AI document understanding
- **PDF Conversion** — Convert PDFs to CSV, JSON, XML, HTML, and PNG formats
- **HTML to PDF** — Generate PDF documents from HTML content
- **PDF Merge** — Combine multiple PDF files into one document
- **PDF Split** — Separate PDF documents into pages or ranges
- **Barcodes** — Generate and read barcodes in multiple formats
- **File Upload** — Upload files for processing by other endpoints

## Why Jentic

- **Setup:** Wiring the PDF.co API by hand means managing the x-api-key header and mapping source URL and output format parameters across conversion, extraction, and barcode calls yourself. Through Jentic you install once, import PDF.co from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** PDF.co carries its source files and options in the request body, so scope the agent by the operations it needs, such as converting a PDF to CSV or JSON or reading a barcode. You choose that set, so operations like merge, split, or invoice parsing are not included unless you add them.
- **Credential handling:** Your PDF.co API key is stored once, encrypted, by your own Jentic One instance and injected into the x-api-key header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'convert a PDF to a spreadsheet' or 'read a barcode from a URL', and Jentic returns the matching PDF.co operation with its input schema specifying source URL and output format so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **CloudConvert API** — Broader format conversion platform supporting 200+ file types beyond just PDF
- **iLovePDF API** — PDF manipulation focused on merge, split, compress, and watermark operations
- **PDF Blocks API** — Simpler PDF manipulation API focused on security and page operations

## FAQ

### What authentication does the PDF.co API use?

The PDF.co API uses an API key passed in the x-api-key header. You obtain your key from the PDF.co dashboard after registration. Through Jentic, this API key is stored encrypted and injected into every request automatically so agents never handle the raw key.

### Can I extract table data from PDFs with the PDF.co API?

Yes. POST /pdf/convert/to/csv extracts tabular data from PDF documents and returns it as a downloadable CSV file. For structured extraction with row and column awareness, POST /pdf/convert/to/json provides JSON output with positional data for each text element.

### What are the rate limits for the PDF.co API?

PDF.co rate limits depend on your subscription plan. Free plans allow 100 API credits per month with a limit of 1 concurrent request. Paid plans provide higher credit allocations and up to 10 concurrent requests. Each endpoint call consumes 1 credit regardless of file size.

### How do I parse an invoice through Jentic?

Search Jentic for 'parse invoice PDF', load the schema for POST /ai-invoice-parser, and execute with the invoice file URL. Jentic handles the x-api-key injection and returns the extracted fields including vendor, invoice number, line items, and totals in a structured response.

### Does PDF.co support asynchronous processing for large files?

Yes. For large documents, you can include an async parameter in your request. The API returns a job ID immediately, and you poll POST /job/check with that ID to monitor progress. When complete, the response includes the download URL for the processed output.

### Can I limit what my agent is allowed to do with the PDF.co API?

Yes. Because you run Jentic One yourself, your own rules decide which PDF.co operations and credentials your agent can use. Since PDF.co passes its source files and options in the request body, you scope the agent to just the operations it needs, such as converting a PDF to CSV or JSON with POST /pdf/convert/to/csv or reading a barcode with POST /barcode/read/from/url. Operations you leave out, like merge via POST /pdf/merge2, split, or invoice parsing via POST /ai-invoice-parser, stay unavailable to the agent unless you add them.
