# StructDoc Layout Large — Document to Markdown Structuring

> StructDoc Layout Large — Document to Markdown Structuring is a paid API for AI agents from structdoc-api.hp-vladic.workers.dev, paid per call via x402, $1.1/call, status unknown (last checked 2026-09-14).

Converts PDFs or images into structured Markdown using layout-aware OCR, extracting tables, key-value pairs, and document structure in 100+ languages

## Facts

- Endpoint: POST https://structdoc-api.hp-vladic.workers.dev/layout-large
- Price: $1.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/structdoc-layout-large-document-to-markdown-structuring-f6ad5976
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9UFHr0-_H2n11g1IysaO4

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 structdoc-layout-large-document-to-markdown-structuring-f6ad5976 -d '<json body>'
```

Example prompt: Extract the full text, tables, and layout from this invoice PDF and give it to me as structured Markdown — it's a multi-page supplier invoice and I need the line items and totals clearly captured.

## When to prefer this

Choose this endpoint when you need rich, layout-aware document extraction that preserves structure (headings, tables, columns) as Markdown — especially for invoices, receipts, forms, or scanned PDFs. Prefer it over simple OCR tools when table structure and document hierarchy matter, and when you need multilingual support without managing API keys.

## Known failure modes

- Unsupported file format returns an error — only PDF and common image formats accepted
- Document too large or too many pages may exceed processing limits
- Poor scan quality or low-resolution images may produce degraded OCR output
- Non-Latin scripts in rare languages may have reduced accuracy despite 100+ language claim
- Payment failure via x402/USDC results in 402 response and no processing
- Timeout on very large or complex multi-page documents

## How this service works

Turn any document into structured data for AI agents — OCR, layout-to-Markdown, tables, key-value, invoice/receipt fields — from PDF/images in 100+ languages. Pay per call via x402 (USDC). No API keys.

## Output

A JSON object containing the model used ('prebuilt-layout'), the number of pages processed, the output format ('markdown'), and a 'content' field with the full Markdown representation of the document including headings, tables, and extracted key-value data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Document URL (PDF/image)"
  },
  "pages": {
   "type": "string",
   "description": "Page range e.g. \"1-5\""
  },
  "base64": {
   "type": "string",
   "description": "Base64 document bytes (≤~6MB)"
  },
  "features": {
   "type": "string",
   "description": "languages,barcodes,keyValuePairs"
  },
  "queryFields": {
   "type": "string",
   "description": "custom fields, comma-separated ≤8"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "prebuilt-layout",
  "pages": 1,
  "format": "markdown",
  "content": "# ..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/structdoc-layout-large-document-to-markdown-structuring-f6ad5976/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from structdoc-api.hp-vladic.workers.dev](https://www.zero.xyz/host/structdoc-api.hp-vladic.workers.dev/llms.txt)
