The PixlDocs render API generates documents on demand from a template + a JSON payload. All endpoints are versioned under /v1 and served from a global edge network.
Base URL
text
https://api.pixldocs.comRequirements
- API key — create one in Account Settings → API keys. One key type,
pxd_, on every plan: never watermarked. Your plan sets the rate limit (20/min Free, 60/min paid) — see /pricing. - HTTPS — all requests must be TLS. Plain HTTP is rejected.
Request shape
All render endpoints accept a JSON body with the same core fields:
json
{
"template_id": "uuid",
"format": "pdf", // "pdf" | "png" | "webp"
"data": { ... }, // your form values
"scale": 2, // optional, raster only, 0.1–4
"form_schema_id": "uuid" // optional, for schema-bound templates
}The whole integration, verbatim
Every call below is executable as written — a real published template id, no placeholders. scripts/land1b-codeblock-walk.mjs extracts this block and runs it against deployed staging, so it cannot drift from the API.
the entire integrationbash
# 1 · find the template — once, at build time
curl https://api.pixldocs.com/v1/templates \
-H "Authorization: Bearer $PIXLDOCS_KEY"
# 2 · what fields does it take? these are the names you send
curl https://api.pixldocs.com/v1/templates/9f7b8380-710e-433a-a4c9-4ecafc986d35/fields \
-H "Authorization: Bearer $PIXLDOCS_KEY"
# 3 · the call your product makes when the event happens
curl https://api.pixldocs.com/v1/render \
-H "Authorization: Bearer $PIXLDOCS_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_id": "9f7b8380-710e-433a-a4c9-4ecafc986d35",
"format": "pdf",
"data": {
"employee_name": "A. Mehta",
"pay_period": "July 2026",
"pay_date": "2026-07-31",
"earnings": [
{ "component": "Basic", "current": 60000, "ytd": 240000 }
]
}
}' --output payslip.pdf # <- the PDF, in the response
# 4 · payroll day: up to 100 per batch, poll the ids
curl https://api.pixldocs.com/v1/renders/batch \
-H "Authorization: Bearer $PIXLDOCS_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"template_id": "9f7b8380-710e-433a-a4c9-4ecafc986d35",
"format": "pdf",
"data": { "employee_name": "A. Mehta" }
}
]
}'Endpoints at a glance
- POST /v1/render — synchronous, returns the file (up to ~90s).
- POST /v1/renders — async, returns a job id.
- POST /v1/renders/batch — up to 100 renders at once.
- GET /v1/renders/:id — poll an async job.
Sync vs async
Use
/v1/render when you can wait a few seconds for the result inline (invoices, one-off PDFs). Use /v1/renders + webhook when you have many renders or a slow front-end (bulk certificates, cron jobs).