一次 POST,返回填充后的文件。它会列出模板所需的字段,并在缺少字段时拒绝渲染文档——同时指明缺失的字段及其所在的单元格、行或幻灯片。
AI 翻译
One POST, the filled file back. It names the fields your template needs, and refuses to render a document with a missing one — naming the field and the cell, row or slide it is in.
开发工具JavaScript · HTMLGitHub @fstandhartinger在线运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证文档生成 API:使用 JSON 填充 Word、Excel 和 PowerPoint 模板,导出 Office 文件、PDF,或两者同时导出。
AI 翻译
Document generation API: fill Word, Excel and PowerPoint templates with JSON and get the Office file, a PDF, or both.
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
POST your JSON against a Word, Excel or PowerPoint template. Get the Office file, a
PDF, or both.
DocMint fills .docx, .xlsx and .pptx templates from a workflow — no Office
install, no COM automation, no per-format library to license. It will also tell you
what fields a template needs before you send any data, and it refuses to render a
document with an unresolved placeholder instead of shipping one with a hole in it.查看完整 README ↗POST your JSON against a Word, Excel or PowerPoint template. Get the Office file, a PDF, or both.
DocMint fills .docx, .xlsx and .pptx templates from a workflow — no Office
install, no COM automation, no per-format library to license. It will also tell you
what fields a template needs before you send any data, and it refuses to render a
document with an unresolved placeholder instead of shipping one with a hole in it.
There is a hosted service at docmint.app.mintapis.com — 30 documents a month free, no card — and an n8n community node that turns a template's placeholders into real n8n fields.
This repository is the API behind both.
Create a free account, copy its API key,
and run this from a clone of this repository (git clone https://github.com/fstandhartinger/docmint.git && cd docmint). You need Node.js
20+ and curl, but no npm install, Office installation or template upload.
The request uses the existing sales-report example
and its complete sample data, rather than a template name your new account does
not have yet.
export DOCMINT_API_KEY='paste-your-api-key-here'
node -e 'const fs=require("node:fs"); process.stdout.write(JSON.stringify({template_base64:fs.readFileSync("examples/sales-report.xlsx").toString("base64"),data:JSON.parse(fs.readFileSync("examples/sales-report.data.json","utf8")),output:"document"}))' > request.json
curl --fail-with-body --max-time 120 \
https://docmint.app.mintapis.com/v1/render \
-H "Authorization: Bearer $DOCMINT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.json \
--output filled-sales-report.xlsx
Open filled-sales-report.xlsx: it contains the filled sales workbook, including
the regional summary. This costs one of your 30 free credits. For a PDF,
change output:"document" to output:"pdf" and the output filename to
filled-sales-report.pdf; that costs two credits. If curl reports an HTTP
error, the output file contains the API's JSON explanation, not an Office file.
Check your remaining credits with:
curl --fail-with-body https://docmint.app.mintapis.com/v1/usage \
-H "Authorization: Bearer $DOCMINT_API_KEY"
For n8n, use the existing DocMint node setup guide instead; you do not need to write the HTTP request yourself.
| Endpoint | What it is for |
|---|---|
POST /v1/render | Template + data → the Office file, a PDF, or both |
POST /v1/render/batch | Many documents in one call |
POST /v1/inspect | Upload a template, get its fields back — no render, no credit |
GET /v1/templates/:name/fields | The same, for a template already stored |
POST /v1/templates | Store a template; versions and rollback included |
POST /v1/jobs | The same renders, asynchronously, with a webhook |
GET /v1/capabilities | What this deployment can actually do, from the code |
GET /v1/usage | Plan, credits used, credits left |
One placeholder syntax across all three formats, images included: {{customer.name}},
loops, conditionals and table-row expansion behave the same in a Word document, a
spreadsheet and a slide deck.
The fill engine is ours. SPEC.md explains why: the obvious library covers DOCX
and PPTX for free but hard-codes XLSX behind a paid module, along with images and
HTML-into-DOCX. Writing the OOXML work ourselves meant one syntax everywhere, no paid
ladder later, and full control over the behaviour this product is judged on — failing
loudly on an unresolved placeholder, by name and by location.
LibreOffice (MPL-2.0, from the Debian archive) does the PDF conversion.
The full reference is at docmint.app.mintapis.com/docs.
| Plan | Documents / month | Price |
|---|---|---|
| Free | 30 | $0 |
| Starter | 2,000 | $9 |
| Pro | 20,000 | $29 |
| Scale | 100,000 | $99 |
A PDF conversion costs a credit on top of the fill, because it costs a LibreOffice process. The docs say so on the pricing section rather than in a footnote.
The canonical hosted service runs on Sandy via Coolify; see DEPLOY.md
for its repository, branch and deployment process. A legacy Render endpoint is
also retained for existing integrations. The old Render/Neon inventory in
ops/INFRASTRUCTURE.md is historical, not a current total-cost estimate or a
safe teardown checklist for the hosted service.
LibreOffice peaks at 219 MB per conversion, measured — which is why
MAX_CONCURRENT_PDF defaults to 1 in a 512 MB container.
A plain Express app, a Postgres database, and soffice on the PATH for PDF output.
The Dockerfile installs libreoffice-writer, libreoffice-calc and
libreoffice-impress, one per input format: the .xlsx import and calc_pdf_Export
ship in the Calc package and the .pptx ones in Impress, so a host with Writer alone
can turn only Word templates into PDFs.
npm install
cp .env.example .env.local # DATABASE_URL and SESSION_SECRET are the only ones needed
npm run migrate
npm start # http://localhost:3000
npm test # needs a database; Stripe tests skip without keys
Without soffice, everything still works except "output":"pdf", and
GET /v1/capabilities says so rather than failing at render time.
Run by one person. Issues and pull requests are read. If a document comes out wrong, an
issue with the id from the X-DocMint-Request-Id header is enough to find it in the
logs.