# Create Word Document (.docx) from Markdown

> Create Word Document (.docx) from Markdown is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-12-01).

Converts a markdown string into a fully native Word (.docx) document with proper formatting, tables, lists, and code blocks, returned as a base64-encoded file.

## Facts

- Endpoint: POST https://agent402.tools/api/docx-create?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/create-word-document-docx-from-markdown-7de4bee4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0X6Bzm8xfqfbIqVtU32lw

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 create-word-document-docx-from-markdown-7de4bee4 -d '<json body>'
```

Example prompt: Can you turn this markdown into a Word document? Here's the content: '# Quarterly Report

This quarter we saw **strong growth**...' — please save it as quarterly-report.docx.

## When to prefer this

Choose this endpoint when you need to programmatically produce a native Word (.docx) file from markdown — especially when recipients need to edit the document in Microsoft Word or when rich formatting (tables, nested lists, code blocks, task lists) must survive as proper Word constructs rather than HTML or PDF. It is preferable over HTML or PDF converters when downstream users require a fully editable Office document.

## Known failure modes

- Malformed or empty markdown input may produce a minimal or empty document
- Extremely large markdown payloads may time out or hit size limits
- Complex nested structures not supported by the Word format may be flattened or dropped
- Missing required 'markdown' field returns an error response
- Invalid characters or encoding issues in the input markdown may cause rendering artifacts

## How this service works

Turn markdown into a real Word document (.docx) in one call. Send "markdown" and an optional "title": headings, paragraphs, bold, italic, strikethrough, inline code, bullet and numbered lists (nested), task lists, tables, code blocks, block quotes, horizontal rules and links come out as native Word.

## Output

Returns a JSON object containing a base64-encoded .docx file (docxBase64), the content MIME type, the filename, and document statistics including total byte size, number of headings, blocks, tables, list items, code blocks, and links.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "title": {
   "type": "string"
  },
  "filename": {
   "type": "string"
  },
  "markdown": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 10520,
  "links": 1,
  "blocks": 10,
  "tables": 1,
  "filename": "update.docx",
  "headings": 1,
  "listItems": 4,
  "codeBlocks": 1,
  "docxBase64": "UEsDBAoAAAAAAG...",
  "contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/create-word-document-docx-from-markdown-7de4bee4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
