BiGapiguides
POST /v1/template/render · 1 cent per operation

Template → PDF

Generate documents from data: Handlebars template + JSON to a finished PDF, PNG or HTML — invoices, reports, certificates. German helpers formatNumber and formatDate included.

Try it

curl -X POST https://api.bigapi.dev/v1/template/render -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"template":"<h1>{{title}}</h1>","data":{"title":"Report"}}' -o out.pdf

New keys come with 100 free operations, no signup: curl -X POST https://api.bigapi.dev/v1/keys. Failed calls cost nothing.

Parameters

NameMeaning
template requiredHTML with Handlebars placeholders such as {{customer.name}} or {{#each items}} … {{/each}}; filled with data and printed. {{x}} escapes HTML, {{{x}}} inserts it raw. Helpers: {{formatNumber amount 2}} gives 1.234,50 (German format, 2 decimals), {{formatDate date}} gives 6.10.2026. An unknown helper returns 400 template_compile_failed.
dataJSON values for the placeholders in template. A placeholder without a value stays empty; the response lists such names in X-BigAPI-Warnings (missing_values).
Default: empty object
formatpdf for a document, png for an image, html for the filled page without printing.
Allowed: pdf, png, html
Default: "pdf"
pdfPage setup for PDF output, same options as render: format (A4, Letter …), landscape, margin, printBackground, scale.
Default: A4 portrait, margins 20 mm top and bottom and 18 mm left and right

Result and price

1¢ · 1 cent per operation

Returns application/pdf | image/png | text/html. Response headers carry the cost (X-BigAPI-Cost) and notes about your input (X-BigAPI-Warnings).

From an agent (MCP)

Connect BiGapi as an MCP server: https://api.bigapi.dev/mcp (hosted) or npx -y @bigapi/mcp (local). Then ask in plain words; the agent finds template_render on its own.