Docs / Quickstart

Get started

Quickstart

Render your first PDF in three steps. You need nothing installed except an HTTP client.

#1. Get an API key

Sign up with your email. There is no password and no credit card. Open API keys in the dashboard, create a key, and copy it. It starts with dp_live_ and is shown once.

Keep it in an environment variable:

export DEVILPDF_API_KEY="dp_live_..."

#2. Render the built-in invoice

Every account can use seven starter templates: invoice, quote, receipt, statement, report, packing-slip and certificate. Send a template id and your data to POST /v1/render.

curl https://devilpdf.com/v1/render \
  -H "Authorization: Bearer $DEVILPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "invoice",
    "data": {
      "number": "INV-1001",
      "issue_date": "2026-03-14",
      "due_date": "2026-04-13",
      "company": { "name": "Northwind Studio", "address": "410 Bay Street\nToronto, ON M5H 2Y4" },
      "customer": { "name": "Acme Robotics Inc.", "address": "2200 Mission Street\nSan Francisco, CA 94110" },
      "items": [
        { "name": "Brand identity system", "quantity": 1, "unit_price": 4800 },
        { "name": "Front-end development", "description": "Billed hourly", "quantity": 46, "unit_price": 135 }
      ],
      "tax_rate": 13,
      "tax_label": "HST"
    }
  }'

You get a document object back. Open url to see the PDF.

Response
{
  "object": "document",
  "id": "doc_nWWGc4ehhC44vpOsHFGn",
  "status": "succeeded",
  "format": "pdf",
  "url": "https://devilpdf.com/f/doc_nWWGc4ehhC44vpOsHFGn/invoice.pdf?exp=1773532800&sig=8fe4b5c6330ae0d9427ba7e78b54a66c",
  "filename": "invoice.pdf",
  "pages": 1,
  "bytes": 29384,
  "duration_ms": 412,
  "template": "invoice",
  "source": "template",
  "batch": null,
  "metadata": null,
  "error": null,
  "expires_at": "2026-03-15T14:02:11.000Z",
  "created_at": "2026-03-14T14:02:10.588Z",
  "completed_at": "2026-03-14T14:02:11.000Z"
}

The invoice template works out the subtotal, tax and total from items, so you never send totals yourself. The full list of fields it accepts is the template's sample_data: fetch it with GET /v1/templates/invoice.

#3. Get the file itself

By default you get JSON with a download link. To get the PDF bytes in the response instead, set "output": "file".

curl https://devilpdf.com/v1/render \
  -H "Authorization: Bearer $DEVILPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "template": "invoice", "data": { "number": "INV-1001" }, "output": "file" }' \
  -o invoice.pdf

With "output": "file" nothing is stored on our side. The document still appears in your log, without a link.

#Next steps