/install azure-content-layout
Azure Content Understanding — Layout Analyzer
Extract structured content from documents using Azure's prebuilt-layout analyzer. Outputs Markdown and structured JSON with text, tables, figures, and document hierarchy.
Setup
Set environment variables:
export AZURE_CU_ENDPOINT="https://YOUR_RESOURCE.services.ai.azure.com/"
export AZURE_CU_API_KEY="YOUR_KEY_HERE"
Optional: set API version (defaults to 2025-05-01-preview):
export AZURE_CU_API_VERSION="2025-11-01"
Quick Usage
Analyze a URL and print Markdown
node scripts/analyze.mjs --url "https://example.com/document.pdf"
Analyze a local file (pipe via stdin)
cat invoice.pdf | node scripts/analyze.mjs --stdin --markdown output.md --output result.json
Save both Markdown and full JSON
node scripts/analyze.mjs --url "https://example.com/report.pdf" \
--markdown report.md \
--output report.json
Direct API Call
When the script isn't available, use curl:
# Submit analysis (preview API)
curl -s -X POST "$AZURE_CU_ENDPOINT/contentunderstanding/analyzers/prebuilt-layout:analyze?api-version=2025-05-01-preview" \
-H "Ocp-Apim-Subscription-Key: $AZURE_CU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/doc.pdf"}'
# Response includes Operation-Location header — poll that URL for results
For GA API (2025-11-01), the body format changes:
{"inputs": [{"url": "https://example.com/doc.pdf"}]}
Output
Markdown
The analyzer produces GitHub Flavored Markdown preserving:
- Headings (h1–h6)
- Tables (as HTML
\x3Ctable>blocks) - Selection marks (☒ checked, ☐ unchecked)
- Figures (with references)
- Paragraphs with reading order
Structured JSON
The full result includes detailed per-element data:
pages— dimensions, word/line counts per pageparagraphs— text blocks with bounding regions and semantic rolestables— cells with row/column spansfigures— detected images/charts with bounding regionssections— hierarchical document structure
Supported Formats
PDF, JPEG, PNG, BMP, TIFF, HEIF, DOCX, XLSX, PPTX, HTML
Best Practices
- Async operation — the API returns 202; poll
Operation-Locationfor results - Poll interval — 3 seconds is reasonable; results typically arrive in 5–60 seconds
- Large documents — up to 2,000 pages supported; processing time scales linearly
- File upload — use
Content-Type: application/octet-streamwith binary body - Tables — rendered as HTML in markdown for complex layouts (merged cells, etc.)
API Reference
See references/api.md for full request/response details.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install azure-content-layout - 安装完成后,直接呼叫该 Skill 的名称或使用
/azure-content-layout触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Azure Content Understanding Layout 是什么?
Extract document structure, text, tables, and figures from documents using Azure Content Understanding prebuilt-layout analyzer. Converts PDF, images, Office... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 174 次。
如何安装 Azure Content Understanding Layout?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install azure-content-layout」即可一键安装,无需额外配置。
Azure Content Understanding Layout 是免费的吗?
是的,Azure Content Understanding Layout 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Azure Content Understanding Layout 支持哪些平台?
Azure Content Understanding Layout 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Azure Content Understanding Layout?
由 zwcih(@zwcih)开发并维护,当前版本 v1.3.0。