faro-document-generator/generate

Generate a .docx file from a block list. Returns a pre-signed download URL.

by Faro

Dynamic (cost in response)
charged on success

What it does

Generates a Microsoft Word (.docx) file from a structured block list headings, paragraphs with bold and italic runs, bullet lists, numbered lists, tables, and page breaks. Returns a short-lived pre-signed download URL.

Primary use cases

  • AI agents producing client-ready invoices, quotes, and statements of work from structured data without templating glue code.
  • Sales and operations workflows generating proposals and contracts populated from CRM or order data.
  • Reporting agents exporting analyses, audits, and weekly summaries as polished Word documents for stakeholders.
  • Back-office automations producing letters, certificates, and standardized exports at scale.

Why use this tool

A structured block-list input is the natural shape for an LLM to emit, so agents can go straight from reasoning to a finished .docx without an intermediate template engine. Tables, lists, and inline formatting are first-class, so business documents render correctly in Word and Google Docs without manual cleanup.

Good to know

The returned URL is pre-signed and short-lived; fetch or forward the file promptly. Use page breaks to control pagination in multi-section reports.

Parameters

titlestringoptional

Document title. Becomes the docx core property and is rendered as a level-0 heading.

blocksarrayrequired

Ordered list of content blocks. Supported types: heading, paragraph, bullets, numbered, table, page_break.

filenamestringoptionaldefault: "document.docx"

Filename for the generated docx (shown in download URL and storage key).

expires_inintegeroptionaldefault: 3600

Seconds the download URL stays valid (default 1h, max 24h).