80trust / 100

Docs Fill Template

by Tanod pdfpeek in Documents & files

x402 APIPassing, checked 3 h ago

pdfpeek (Tanod) Word template fill: {{placeholders}} in a DOCX replaced from JSON data, returned as DOCX. Use when an agent must fill a Word template's {{placeholders}} with data and return a DOCX or PDF.

POST https://tanod.dev/v1/docs/fill-template

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
278 ms typical, 1.4 s slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://tanod.dev/v1/docs/fill-template' \
  -H 'content-type: application/json' \
  --data-raw '{"data":{"customer":{"city":"Lisbon","name":"Acme Ltd"},"invoice":{"number":"INV-1042"},"items":[{"name":"Widget","price":"9.00","qty":3},{"name":"Gadget","price":"24.50","qty":1}],"total":"51.50"},"url":"https://tanod.dev/samples/invoice-template.docx"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Fdocs%2Ffill-template
const res = await pay("https://tanod.dev/v1/docs/fill-template", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"data\":{\"customer\":{\"city\":\"Lisbon\",\"name\":\"Acme Ltd\"},\"invoice\":{\"number\":\"INV-1042\"},\"items\":[{\"name\":\"Widget\",\"price\":\"9.00\",\"qty\":3},{\"name\":\"Gadget\",\"price\":\"24.50\",\"qty\":1}],\"total\":\"51.50\"},\"url\":\"https://tanod.dev/samples/invoice-template.docx\"}",
});
console.log(await res.json());

Example input

{
  "data": {
    "customer": {
      "city": "Lisbon",
      "name": "Acme Ltd"
    },
    "invoice": {
      "number": "INV-1042"
    },
    "items": [
      {
        "name": "Widget",
        "price": "9.00",
        "qty": 3
      },
      {
        "name": "Gadget",
        "price": "24.50",
        "qty": 1
      }
    ],
    "total": "51.50"
  },
  "url": "https://tanod.dev/samples/invoice-template.docx"
}

Example output

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

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402281 ms$0.005
7 h agoPassed402265 ms$0.005
11 h agoPassed402267 ms$0.005
14 h agoPassed402363 ms$0.005
18 h agoPassed402289 ms$0.005
22 h agoPassed4021.4 s$0.005
26 h agoPassed402272 ms$0.005
29 h agoPassed402281 ms$0.005
33 h agoPassed402270 ms$0.005
36 h agoPassed402271 ms$0.005
40 h agoPassed402371 ms$0.005
44 h agoPassed402270 ms$0.005
2 days agoPassed402441 ms$0.005
2 days agoPassed4022.6 s$0.005
2 days agoPassed402261 ms$0.005