# Tanod Docs – DOCX Template Fill

> Tanod Docs – DOCX Template Fill is a paid API for AI agents from docs.tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-14).

Fills a DOCX template with JSON data, replacing {{placeholders}} and repeating table rows for lists, returning a filled DOCX or PDF file.

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/docs/fill-template?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-docs-docx-template-fill-8ea9b093
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cEUvf0fpsdKdsTifmSWGV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tanod-docs-docx-template-fill-8ea9b093 -d '<json body>'
```

Example prompt: Take my invoice DOCX template at https://example.com/invoice_template.docx, fill it with this data — customer name 'Acme Corp', amount '$4,200', due date 'June 15 2025' — and give me back a PDF.

## When to prefer this

Choose this endpoint when you need to merge structured JSON data into a DOCX template with {{placeholder}} syntax, especially when you need loop/table repetition for list data or want the result as a rendered PDF — it handles both simple mail-merge and complex tabular document generation in one call.

## Known failure modes

- Template URL is private, internal, or IP-literal — returns refusal error
- DOCX file exceeds 20 MB (URL) or 10 MB (base64) — returns size error
- JSON data object exceeds 1 MB or 12 nesting levels — returns validation error
- Malformed or non-DOCX file provided — returns parsing error
- PDF rendering failure via LibreOffice — returns conversion error
- Unmatched loop tags in template — returned in unmatched_loop_tags field without hard failure

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

Returns a JSON object with the filled file (as base64 data or a 24-hour download URL), the output format, number of placeholders filled, a list of missing/unmatched placeholders, and file metadata (bytes, content_type).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the DOCX template (at most 20 MB; private, internal and IP-literal hosts are refused); or use file_base64."
  },
  "data": {
   "type": "object",
   "description": "The values, a JSON object (at most 1 MB, 12 levels deep). {{name}} reads data[\"name\"], {{customer.name}} data[\"customer\"][\"name\"], {{items.0}} the first element of a list. A table row holding {{#items}} and {{/items}} is repeated for each element of the list items; inside it {{field}} reads the element first, then data, and {{.}} is the element itself.",
   "additionalProperties": true
  },
  "output": {
   "enum": [
    "docx",
    "pdf"
   ],
   "type": "string",
   "default": "docx",
   "description": "docx (default) or pdf (the filled file rendered by LibreOffice; priced higher)."
  },
  "delivery": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "file_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The DOCX template as base64 (at most 10 MB decoded); or use url."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "file": {
   "name": "filled.docx",
   "bytes": 1151,
   "data_base64": "UEsDBBQAAAAIAAAA... (trimmed: 1,536 base64 characters in the reply)",
   "content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  },
  "output": "docx",
  "missing": [],
  "operation": "docx-fill",
  "input_bytes": 1158,
  "output_bytes": 1151,
  "untrusted_content": true,
  "placeholders_filled": 10,
  "unmatched_loop_tags": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-docx-template-fill-8ea9b093/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docs.tanod.dev](https://www.zero.xyz/host/docs.tanod.dev/llms.txt)
