Fill your own template (PDF or Word)
fill_templateFills {{placeholders}} in your own template with JSON data and returns a finished document. Templates: Markdown, plain text or HTML (up to 50 KB; headings, paragraphs, lists and | tables | are kept; HTML is reduced to text, scripts and remote images are dropped and nothing is fetched) rendered to PDF and/or Word, or a Word .docx file (base64, up to 1 MB) whose placeholders are replaced and returned as .docx. Nested keys use dots, e.g. {{client.name}}. Missing keys are listed; set strict to fail (free) instead. 20 credits ($0.02) per successful document. PAID: 20 credits ($0.02) per successful call from one-time prepaid credits; send Authorization: Bearer <api_key>. Failed or empty calls are free. Keyless callers get 3 free trial calls per day.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data": "<data>"
},
"name": "fill_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Values for the placeholders (JSON, up to 20 KB). | |
| title | No | ||
| format | No | Output files (default both). | |
| strict | No | Fail (not charged) when any placeholder has no value. | |
| api_key | No | Optional. Only for clients that cannot send an Authorization header. | |
| template | No | Markdown, text or HTML template with {{placeholders}}. For a Word template use template_format docx with docx_base64. PDF files are not accepted as templates (output can be PDF). | |
| docx_base64 | No | A Word .docx template with {{placeholders}}, base64-encoded (up to about 1 MB). Not a PDF. | |
| organization | No | ||
| template_format | No | Default markdown. Use docx with docx_base64. |