Install
openclaw skills install azure-content-layoutExtract document structure, text, tables, and figures from documents using Azure Content Understanding prebuilt-layout analyzer. Converts PDF, images, Office docs into Markdown and structured JSON. Use when asked to extract text from documents, convert PDF/images to markdown, perform OCR, analyze document layout, or extract tables from files. Requires AZURE_CU_ENDPOINT and AZURE_CU_API_KEY environment variables.
openclaw skills install azure-content-layoutExtract structured content from documents using Azure's prebuilt-layout analyzer. Outputs Markdown and structured JSON with text, tables, figures, and document hierarchy.
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"
node scripts/analyze.mjs --url "https://example.com/document.pdf"
cat invoice.pdf | node scripts/analyze.mjs --stdin --markdown output.md --output result.json
node scripts/analyze.mjs --url "https://example.com/report.pdf" \
--markdown report.md \
--output report.json
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"}]}
The analyzer produces GitHub Flavored Markdown preserving:
<table> blocks)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 structurePDF, JPEG, PNG, BMP, TIFF, HEIF, DOCX, XLSX, PPTX, HTML
Operation-Location for resultsContent-Type: application/octet-stream with binary bodySee references/api.md for full request/response details.