PDF API · PDF generation API

Generate PDFs automatically from your own data.

Build the template once. Your system sends the record as JSON whenever a document is owed, and gets a finished PDF back in the response — no PDF library, no headless browser, no layout code in your app.

Opens a real a packing slip with sample data — edit a field and download the PDF. No account or card for the example. PixlDocs is free for 1 year.

Real output

  • Invoice rendered by the PixlDocs API

    Invoice

  • Account statement rendered by the PixlDocs API

    Account statement

  • Usage report rendered by the PixlDocs API

    Usage report

Rendered through the production pipeline from published templates with sample data.

Reuse a PDF template for each new record

Use a saved template when the layout stays the same and the data changes. Your app keeps the template ID and sends the next invoice, statement or delivery record without resending its HTML.

Recurring invoices

Reuse the invoice layout for each billing cycle. Supply your customer, invoice number and calculated amount; keep financial calculations in your billing system.

Packing slips after fulfilment

Send the order and item rows to a delivery-note template. Inspect its fields first: array and column names belong to that template, not a universal invoice schema.

Monthly account statements

An HTML template suits repeating rows and multi-page output. Check page breaks with a short and a long statement before automating the monthly run.

The request

Create a template, then render the matching fields

bash
# Set PIXLDOCS_API_KEY to your own key. Requires Python 3.
curl --fail-with-body https://api.pixldocs.com/v1/templates \
  -H "Authorization: Bearer $PIXLDOCS_API_KEY" \
  -H "Content-Type: application/json" \
  --output template.json \
  -d '{
    "kind": "html",
    "name": "Sample invoice",
    "html_source": "{% comment %}\n@field customer_name text\n@field invoice_no text\n@field amount text\n{% endcomment %}<h1>Invoice {{ invoice_no }}</h1><p>{{ customer_name }}</p><p>Amount due: {{ amount }}</p>"
  }' && \
TEMPLATE_ID=$(python3 -c 'import json; print(json.load(open("template.json"))["template_id"])') && \
curl --fail-with-body https://api.pixldocs.com/v1/render \
  -H "Authorization: Bearer $PIXLDOCS_API_KEY" \
  -H "Content-Type: application/json" \
  --output invoice.pdf \
  -d "{\"template_id\":\"$TEMPLATE_ID\",\"format\":\"pdf\",\"data\":{\"customer_name\":\"Sample Buyer\",\"invoice_no\":\"INV-1041\",\"amount\":\"USD 42.00\"}}"

This example creates a template in your workspace and saves invoice.pdf. Keep the returned template ID for later records. The three data keys exactly match the declared fields; sample names and amounts are illustrative.

Three ways in
A saved template, your own HTML, or a public URL.
A stable field contract
Templates declare their fields; unknown keys are refused, not dropped.
Single or batch
One call per document, or a batch with signed webhooks.
Background jobs
Queue recurring work and read the job status before delivering a file.

Before you automate it

  • For an existing template, read GET /v1/templates/:id/fields before mapping your data. Unknown keys are rejected rather than silently dropped.
  • Use the response Content-Type and status to distinguish PDF bytes from an error or a queued result. Do not save an error response as a PDF.
  • For background work, use POST /v1/renders and check its job status. Connect webhooks or polling to your delivery step.
  • Batch requests accept up to 100 items. Split a larger run into batches and follow the documented error and retry behaviour.

Questions

Where do templates come from?

Start from one in the Documents library, write HTML with Liquid placeholders, or have the AI draft one from a description. You publish it, then render it by id.

Can I call it from a no-code tool?

Yes — use the public n8n node. The Zapier and Make apps are private and call the same render API.

Can someone help us set it up?

Yes. Send us a real document and we will walk through how it maps to a template.

Is it free?

Yes. PixlDocs is free for 1 year from 3 October 2026 while we work with early users. Try a real example without an account, or create a free account to integrate your own templates. Free setup help is available; business teams can talk to us separately.

Try it on sample data, then bring your own document.

Start with the free example. If your document or data source is different, send us one sample and tell us where the data lives — we set up the first template with you, free. Business and enterprise teams can contact us separately.