Word template API
You have a .docx, .xlsx or .pptx that
somebody in finance maintains, you have JSON, and you want the filled document back — ideally as a
PDF. This page describes the whole job, including the parts that are unpleasant, and compares the
products that do it. It is written by the people who build DocMint, one of the five. Every
competitor price was read off the vendor's own pricing page on 29 August 2026; where a vendor
does not publish something, this page says "not published" rather than guessing.
What the job actually is
It looks like string replacement. It is six steps, and the fourth is the one that surprises people.
- Open the file. All three formats are ZIP archives of XML. Word's text lives in
word/document.xml, Excel's inxl/worksheets/sheet1.xmlplus a shared string table, PowerPoint's in one XML part per slide. - Find the placeholders. Harder than a regex, see below.
- Join them to your data, including nested arrays for repeating table rows.
- Repeat the structure, not just the text. A loop over line items must clone a table
row — the surrounding
<w:tr>— not paste text four times. In Excel it must insert rows and then rewrite every formula range that should have grown. In PowerPoint it may mean duplicating a slide. - Write the archive back with the right content types, so Word opens it without the repair dialog.
- Optionally convert to PDF, which means LibreOffice, which means a process, a few hundred megabytes of memory and a queue.
The five parts that are hard
- Word splits placeholders across runs. Type
{{name}}, then go back and edit the middle of the word, and Word stores it as{{na+me}}in two separate<w:r>elements — sometimes because of a spell-check marker you cannot see. A naive scanner finds nothing and reports a template with no placeholders. Every serious implementation flattens the runs, matches, and then re-slices them so the formatting survives. - Numbers in spreadsheets stop being numbers. Write
"1234.5"into a cell as text andSUM()over that column returns 0. Nothing warns anybody. A cell that is one placeholder resolving to a number has to become a real numeric cell, keeping its number format. - Formula ranges must grow with the loop. Insert four line-item rows and
SUM(B3:B6)has to becomeSUM(B3:B9). Chart series and pivot caches keep their own copies of those ranges — this is where most implementations, including ours, have edges. - The placeholder names are invisible. They live inside a zipped binary. Your workflow tool cannot open it, so you guess the JSON keys, render, open the result in Word, find the field that came out empty, and guess again. This is the loop that costs the afternoon.
- Silent failure is the default almost everywhere. A missing value renders as an empty cell,
or as the literal word
undefined. Nothing errors. The document looks plausible, and nobody notices until it has been emailed to a customer.
When to build it yourself
Genuinely often. Do not buy an API if one of these holds:
- The documents must not leave your network. Payroll, medical records, anything where the compliance question is answered by the data not moving. A library in your own process wins that argument outright.
- Word only, no images, no Excel, no PDF. docxtemplater's
MIT-licensed core does
{tag}replacement, conditions and loops for free and does it well. Adding a vendor and a network hop for that would be silly. Python users havedocxtpl; .NET users have OpenXML SDK. - Above roughly a million documents a year. A flat annual licence beats any per-document meter, including ours.
- You need it in the browser or offline. An HTTPS endpoint cannot help you.
Buy one when you want the PDF step without operating LibreOffice, when you need Excel and PowerPoint as well as Word, or when the render has to fail loudly rather than silently and you would rather not build that yourself.
The billing units do not match
Comparing sticker prices is misleading until you know what each vendor counts. Read on 29 August 2026, from each vendor's own page:
| Product | One unit is |
|---|---|
| Carbone | 1 MB of injected data. Their words: "0.5 MB = 1 document, 1.2 MB = 2 documents, 2.3 MB = 3 documents." Overage "will be invoiced separately". |
| Docupilot | One delivery. Their documentation: "Downloading generated document also consumes 1 credit." Hard stop at the ceiling. |
| Docmosis Cloud | One page. "The total number of pages in all documents successfully generated in one calendar month." A ten-page report is ten units. No overage charges and no blocking at quota. |
| docxtemplater | Nothing is metered — it is a library. You pay per module, per year. |
| DocMint | One document. A PDF conversion costs one more. Failed renders are refunded; asking what a template needs is free. |
Five products side by side
| DocMint | Carbone | Docupilot | Docmosis | docxtemplater | |
|---|---|---|---|---|---|
| Free tier | 30 docs/mo | 100 docs/mo | 14-day trial | Free trial | Unlimited (core, self-run) |
| Entry paid | $9 / 2,000 | €29 / 1,000 | $29 / 100 | $49 / 4,000 pages | €500 / yr, one module |
| Same money, more docs | $29 / 20,000 | €159 / 20,000 | $199 / 2,000 | tiered by pages | €1,250 / yr, 4 modules |
| Word / Excel / PowerPoint | All three, every plan | All three | Word, PDF focus | All three | Word free; Excel and slides are paid modules |
| Tells you the template's fields | Yes, free endpoint | No introspection endpoint | Not published | Not published | No |
| Missing placeholder | HTTP 422 with field and location | Renders blank | Not published | Not published | Writes undefined by default |
| Template editor in a browser | No, and none planned | Yes, Studio | Yes | Yes | No |
| Charts, barcodes, HTML into Word | No | Yes (Enterprise Edition) | Rich text, QR, maps | Yes | Paid modules |
| Delivery (email, Drive, S3) | No — returns the file | Yes | Yes, ~70 integrations | Varies | No |
| On-premise | No | Yes | No | Yes, from $3,795 perpetual | Yes, it is a library |
Scroll the table sideways to see every column. Sources: each vendor's published pricing and documentation, read on 29 August 2026. "Not published" means the vendor does not document the behaviour and it was not guessed at.
Deliberately absent: APITemplate.io, which is often listed as a competitor in this
category but has no Word, Excel or PowerPoint support of any kind — its live v2 API has no docx
endpoint and cannot accept a .docx even as input. Comparing it on Office features would
be a false comparison, so it is not made.
Choosing, in four questions
- Can the data leave your network? If no, stop here and self-host a library.
- Who edits the templates? If it is somebody who will not open a code editor, you want a product with a browser studio — Carbone, Docupilot or Docmosis. DocMint has no editor and none planned.
- What is in the documents? Charts, barcodes, formatted HTML flowed into Word, QR codes, signatures: the bigger platforms have them. Plain text, numbers, images, tables and totals: the cheap end is enough.
- How many, and how big? Under a hundred a month, the free tiers decide it and Carbone's is the largest of the hosted ones. Tens of thousands, the unit definitions above decide it. Over a million a year, buy a licence.
What we cannot claim
DocMint is one of the five products in that table and the newest by a wide margin. So, plainly: no paying customer from outside our own circle yet; the smallest free tier of the hosted options, 30 documents a month against Carbone's 100; one region, one instance, no SLA and no SOC 2 report — Frankfurt, a single small instance that restarts on every deploy; PDF conversion runs one at a time, measured at 1,346 ms server-side on 29 August 2026, so a burst queues rather than slows; no browser template editor, no charts, no HTML into Word, no delivery integrations and no web dashboard. The full list lives on the home page under "What DocMint does not do yet", where you can read it before you build on it rather than after.
What we will stand behind, because it is measurable from outside: five consecutive
.docx renders at 10 ms server-side and 54–74 ms round trip from Germany on
29 August 2026; a free key from one POST /v1/signup with no card and no dashboard; and
a failed render costing nothing, verified across eight deliberate failures with
GET /v1/usage reporting credits: 0 for every one of them.
Next: the n8n routes, or the detailed comparisons with Carbone, Docupilot and docxtemplater.