Office OOXML Template Merge & Markdown Extractor API

Brand-safe .docx/.pptx template merging (fixing Word split XML runs & table loops) and 85%+ token-saving .docx/.pptx/.xlsx Markdown extraction.

Zero-dependency Cloudflare Edge OOXML engine that merges .docx and .pptx templates (healing split XML runs, preserving run/cell styles, and expanding repeating table rows) and extracts .docx, .pptx, and .xlsx files into token-minimal Markdown.

document-automation office-ooxml context-compression business-ops

Why Agents Call This API Instead of DIY

Typing {{customer_name}} in Word or PowerPoint shatters placeholders across multiple <w:r>/<a:r> runs with <w:proofErr/> tags, breaking naive regex scripts and corrupting PKZIP CRC32 headers. This API heals split runs, clones styled table rows, and extracts clean Markdown in milliseconds.

DimensionDIY Inside Agent Sandbox / PromptOffice OOXML Template Merge & Markdown Extractor API (office-template)
Onboarding & AuthInstall packages, debug runtime errors, or manage API keysZero signup — instant HTTP 402 (x402 USDC) & remote MCP
Context & Token CostThousands of tokens spent in multi-turn code/parse loopsDeterministic compact JSON response (<1.5K tokens)
Schema ValidationSilent runtime failures on malformed inputsFree ?dry_run=true preflight ($0.00 on 4xx errors)

Tools & Payable Endpoints (2)

merge_office_template — Merge .docx or .pptx Office Template

$0.004 USD per Office template merge (.docx or .pptx) (x402 instant micropayment)

Coalesces split {{variable}} runs across Word (<w:r>) and PowerPoint (<a:r>) paragraphs while preserving opening-run typography, expands {{#loop}}...{{/loop}} table rows, replaces variables across body/headers/footers/slides, and returns a valid PKZIP Base64 document plus any unmatchedPlaceholders.

Why buy vs. DIY: Eliminates broken {{tags}} caused by Word/PowerPoint spellcheck run-splitting, <a:br/> vs <w:br/> schema errors, and corrupt PKZIP Central Directory CRCs.

extract_office_markdown — Extract Token-Minimal Markdown from .docx, .pptx, or .xlsx

$0.002 USD per Office document extraction (.docx, .pptx, or .xlsx) (x402 instant micropayment)

Auto-detects .docx, .pptx, or .xlsx from OOXML structure and converts headings, lists, Word/PowerPoint tables, numerically ordered slides, speaker notes, and sparse Excel worksheets into compact GitHub-Flavored Markdown with token-savings telemetry.

Why buy vs. DIY: Saves 80-95% of context window tokens vs raw OOXML dumps and handles Excel sharedStrings.xml + sparse cell coordinates (A1, D5) without external libraries.

Quickstart: MCP, x402 & Optional Bearer API Key

1. Streamable HTTP MCP Config (com.apikeg/office-template)

{
  "mcpServers": {
    "office-template": {
      "type": "streamable-http",
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}

Using a Monthly Stripe Plan? Get your per-email ak_live_... key at https://apikeg.com/account ($5 / $20 / $50 monthly tiers) and pass header Authorization: Bearer ak_live_... on REST or MCP requests.

2. Free Schema Dry-Run ($0.00)

curl -X POST "https://office-template.apikeg.com/v1/merge-office-template?dry_run=true" \
  -H "Content-Type: application/json" \
  -d '{"fileBase64":"UEsDBBQAAAAIA...","format":"docx","variables":{"customer_name":"Acme Robotics, Inc.","billing_address":"500 Market St\nSuite 1200\nSan Francisco, CA","contract_id":"MSA-2026-089"},"tableLoops":{"items":[{"sku":"ENT-SEAT","description":"Enterprise Agent Seat","qty":25,"total":"$2,500"},{"sku":"DED-EDGE","description":"Dedicated Edge Worker","qty":1,"total":"$500"}]}}'

Common Agent & Automation Workflows

Frequently Asked Questions

Why should an AI agent call Office OOXML Template Merge & Markdown Extractor API instead of writing custom code?

Typing {{customer_name}} in Word or PowerPoint shatters placeholders across multiple <w:r>/<a:r> runs with <w:proofErr/> tags, breaking naive regex scripts and corrupting PKZIP CRC32 headers. This API heals split runs, clones styled table rows, and extracts clean Markdown in milliseconds.

How do I connect Office OOXML Template Merge & Markdown Extractor API to Claude, Cursor, or an MCP client?

Connect directly to the stateless Streamable HTTP MCP endpoint at https://office-template.apikeg.com/mcp (registry ID: com.apikeg/office-template). No API keys or OAuth accounts are required; initialize and tools/list are 100% free.

How much does Office OOXML Template Merge & Markdown Extractor API cost per API or MCP call?

Pay per call with zero signup via HTTP 402 (x402 v2 USDC on Base): merge_office_template ($0.004 USD per Office template merge (.docx or .pptx) (x402 instant micropayment)); extract_office_markdown ($0.002 USD per Office document extraction (.docx, .pptx, or .xlsx) (x402 instant micropayment)). Prefer traditional monthly billing? Get a verified-email Bearer API key at https://apikeg.com/account with $5/mo ($6 credit), $20/mo ($28 credit), or $50/mo ($80 credit) per-product plans. Invalid schemas (HTTP 400) and ?dry_run=true always cost $0.00.

Can I validate request payloads for free before paying?

Yes. Pass ?dry_run=true in the URL or send the header X-Dry-Run: true to validate your JSON input against the strict schema at $0.00 cost.