Api2Pdf integration
Api2Pdf generates and converts documents: render web pages, raw HTML or Markdown to PDF or images with Headless Chrome (or wkhtmltopdf), convert Word, Excel, PowerPoint and other files to PDF, turn HTML into .docx or .xlsx, extract PDFs to Markdown, HTML or JSON for data extraction, merge, split, watermark and password-protect PDFs, zip files and generate barcodes or QR codes. Every tool except delete_file answers with a FileUrl link to the result, kept for 24 hours. The GET convenience variants of the URL converters, the health check and the balance check are not exposed. Authentication is the API key from the Api2Pdf portal, sent as is in the Authorization header.
Say what should happen.
The workflow builds itself.
What you can do with Api2Pdf
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Html, 4 operations
chrome_html_to_imageChrome html to imagePOSTRenders raw HTML to an image with Headless Chrome and returns a link to the image (FileUrl). Useful for social cards, receipts or previews built as HTML.chrome_html_to_pdfChrome html to pdfPOSTRenders raw HTML (with inline or linked CSS) to PDF with Headless Chrome and returns a link to the PDF (FileUrl). Use it for invoices, reports or any document you build as HTML.pdf_to_htmlPdf to htmlPOSTExtracts the content of a PDF at a public URL as HTML with OpenDataLoader. Returns a link to the HTML file (FileUrl).wkhtml_html_to_pdfWkhtml html to pdfPOSTConverts raw HTML to PDF with the wkhtmltopdf engine and returns a link to the PDF (FileUrl). Api2Pdf recommends chrome_html_to_pdf instead; use this for legacy layouts or its table of contents.
Markdown, 3 operations
chrome_markdown_to_imageChrome markdown to imagePOSTRenders raw Markdown to an image with Headless Chrome and returns a link to the image (FileUrl).chrome_markdown_to_pdfChrome markdown to pdfPOSTRenders raw Markdown to PDF with Headless Chrome, without an intermediate HTML step, and returns a link to the PDF (FileUrl).pdf_to_markdownPdf to markdownPOSTExtracts the text of a PDF at a public URL as Markdown with OpenDataLoader, keeping headings, lists and tables where the PDF structure allows. Returns a link to the Markdown file (FileUrl).
Url, 3 operations
chrome_url_to_imageChrome url to imagePOSTTakes a screenshot of a public web page with Headless Chrome and returns a link to the image (FileUrl). Options set the viewport size, full-page capture and a render delay.chrome_url_to_pdfChrome url to pdfPOSTRenders a public web page to PDF with Headless Chrome and returns a link to the PDF (FileUrl). Options control paper size, margins, orientation, headers and footers, and waiting for the page to load.wkhtml_url_to_pdfWkhtml url to pdfPOSTConverts a public web page to PDF with the wkhtmltopdf engine and returns a link to the PDF (FileUrl). Api2Pdf recommends chrome_url_to_pdf instead; use this for legacy layouts or its table of contents.
Any to pdf, 1 operation
office_file_to_pdfOffice file to pdfPOSTConverts a Word, Excel, PowerPoint, image, text, email or other LibreOffice-readable file at a public URL to PDF and returns a link to the PDF (FileUrl).
Extract page, 1 operation
extract_pdf_pagesExtract pdf pagesPOSTExtracts a page range from a PDF at a public URL into a new PDF and returns a link to it (FileUrl). Pages are counted from 0, and negative numbers count from the end (-1 is the last page).
File, 1 operation
delete_fileDelete fileDELETEDeletes a file Api2Pdf generated, right away instead of after the automatic 24-hour expiry. Pass the ResponseId returned by the call that created the file.
Html to docx, 1 operation
html_to_docxHtml to docxPOSTConverts HTML to a Microsoft Word file (.docx) and returns a link to it (FileUrl). Send the HTML itself in Html, or a link to an HTML page in Url; Html wins when both are given.
Html to xlsx, 1 operation
html_to_xlsxHtml to xlsxPOSTConverts HTML tables to a Microsoft Excel workbook (.xlsx) and returns a link to it (FileUrl). Send the HTML itself in Html, or a link to an HTML page in Url; Html wins when both are given.
Json, 1 operation
pdf_to_jsonPdf to jsonPOSTExtracts the content of a PDF at a public URL as structured JSON with OpenDataLoader (headings, paragraphs, tables and their layout), for data extraction or RAG pipelines. Returns a link to the JSON file (FileUrl).
Markitdown, 1 operation
file_to_markdownFile to markdownPOSTConverts a PDF, Office document, HTML page or other file at a public URL to clean Markdown with Microsoft MarkItDown, for search, storage or LLM input. Returns a link to the Markdown file (FileUrl).
Merge, 1 operation
merge_pdfsMerge pdfsPOSTMerges several PDFs, given as public URLs, into one PDF in the order listed and returns a link to the merged file (FileUrl). Chain it after the conversion tools by passing their FileUrl values.
Password, 1 operation
add_pdf_passwordAdd pdf passwordPOSTAdds password protection to an existing PDF at a public URL and returns a link to the protected copy (FileUrl). The user password is needed to open it; the optional owner password controls permissions.
Thumbnail, 1 operation
generate_thumbnailGenerate thumbnailPOSTGenerates an image of the first page of a PDF or Office document at a public URL and returns a link to the image (FileUrl). Useful for previews in a list of documents.
Watermark, 1 operation
add_pdf_watermarkAdd pdf watermarkPOSTStamps a text watermark (for example DRAFT or CONFIDENTIAL) on every page of a PDF at a public URL and returns a link to the watermarked copy (FileUrl). Font size, color, opacity and rotation are adjustable.
Zebra, 1 operation
generate_barcodeGenerate barcodeGETGenerates a barcode or QR code image with ZXing (QR_CODE, CODE_128, CODE_39, EAN_13, UPC_A, DATA_MATRIX, PDF_417 and more) and returns a link to the image (FileUrl).
Zip, 1 operation
create_zipCreate zipPOSTDownloads several files from public URLs and packs them into one .zip archive, each under the file name or sub-folder path you choose, and returns a link to the archive (FileUrl).
Use Api2Pdf from Claude Code, Cursor or Codex
Connect Api2Pdf in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Api2Pdf operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Api2Pdf
- Create your workspace
Sign up free. Nothing to install.
- Connect Api2Pdf once
Add your Api2Pdf connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Api2Pdf integration FAQ
What can you do with the Api2Pdf integration?
LiveContext exposes 23 operations on Api2Pdf, covering html, markdown, url and any to pdf.
