PDF API · JSON to PDF API

Send JSON. Get a PDF.

Your template defines where each field goes. Your request carries the JSON — scalars, nested objects and arrays for tables — and the response is the PDF. Missing fields stay blank; unknown fields are rejected so mistakes surface immediately.

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

  • Line items from a JSON array rendered by the PixlDocs API

    Line items from a JSON array

  • Per-line tax from data rendered by the PixlDocs API

    Per-line tax from data

  • Purchase order rendered by the PixlDocs API

    Purchase order

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

The request

POST /v1/render

bash
curl -X POST https://api.pixldocs.com/v1/render \
  -H "Authorization: Bearer pxd_YOUR_KEY" \
  -H "Content-Type: application/json" \
  --output order.pdf \
  -d '{
    "template_id": "YOUR_TEMPLATE_ID",
    "format": "pdf",
    "data": {
      "customerName": "Acme Corp",
      "items": [
        { "description": "Widget", "qty": 3, "unit_price": 40 },
        { "description": "Setup", "qty": 1, "unit_price": 120 }
      ]
    }
  }'

Replace pxd_YOUR_KEY with a key from your dashboard. The response body is the file.

Arrays become tables
Line items repeat and paginate automatically.
Discoverable fields
GET /v1/templates/:id/fields returns the contract.
Fails loudly
Unknown keys return 400 unknown_fields.
Or skip templates
POST /v1/render/html with markup plus data.

Questions

How do I know which keys to send?

Each template declares its fields. GET /v1/templates/:id/fields lists them with types.

What happens with a typo in a key?

The render is refused with 400 unknown_fields instead of producing a document with a silent gap.

Can I send nested data?

Yes — objects and arrays are supported; arrays drive repeating rows and tables.

PNG instead of PDF?

Set "format": "png" or "webp".

Is it free?

Yes. PixlDocs is free for 1 year from 3 October 2026 while we work with early users. You can try a real example with no account; a free account starts with 100 credits, and you can ask us for more free credits when you run out.

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.