Home  ›  Tool API  ›  Word Document API

Word Document API

Generate a DOCX document from Markdown or JSON

Generate a real DOCX Word document from a title, Markdown-style content, structured paragraphs, or a table. Free browser tool, REST API, and MCP for agents.

✓ Transparent usage terms✓ REST + MCP✓ Real browser tool

Working examples

Copy it into your stack.

Send a title plus Markdown-style content, structured paragraphs, or a bounded table. The response contains a temporary DOCX download URL.

Copyable requests

curl
curl -X POST https://agentmediatools.com/api/generate-docx \
  -H "Content-Type: application/json" \
  -d '{"title":"Weekly report","markdown":"## Summary\nAll checks passed."}'
JavaScript
const response = await fetch("https://agentmediatools.com/api/generate-docx", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    title: "Weekly report",
    markdown: "## Summary\nAll checks passed."
  })
});
console.log(await response.json());
Python
import requests

response = requests.post(
    "https://agentmediatools.com/api/generate-docx",
    json={"title": "Weekly report", "markdown": "## Summary\nAll checks passed."},
)
print(response.json()["downloadUrl"])

Example JSON response

{"success":true,"filename":"d4e5f6.docx","downloadUrl":"/downloads/d4e5f6.docx","size":7612,"title":"Weekly report"}

Download URLs are temporary. Save results to your own storage when the workflow needs durable retention.

Frequently asked questions

What input formats are accepted?

Send a title with Markdown-style content, structured paragraphs, or an optional two-dimensional table.

Does it support arbitrary Word templates?

No. The endpoint builds a new bounded document; it does not upload or merge into arbitrary DOCX templates.

Can an AI agent generate the document?

Yes. Use REST POST /api/generate-docx or the generate_docx MCP tool.

How long is the download available?

Generated downloads are temporary and normally expire after about 20 minutes. Save the document promptly.

One tool now, one integration later

Test it in the browser. Automate it when ready.

The same Agent Media Tools account connects this operation to the wider Tool API and MCP catalog.