{"uid":"cap_9UFHr0-_H2n11g1IysaO4","slug":"structdoc-layout-large-document-to-markdown-structuring-f6ad5976","name":"StructDoc Layout Large — Document to Markdown Structuring","description":"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.","url":"https://structdoc-api.hp-vladic.workers.dev/layout-large","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"type":"json","example":{"model":"prebuilt-layout","pages":1,"format":"markdown","content":"# ..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$1.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JN_Go0C27MwY861aALSy2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts PDFs or images into structured Markdown using layout-aware OCR, extracting tables, key-value pairs, and document structure in 100+ languages","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Parse scanned receipts for expense reports","prompt":"I've got a stack of scanned receipt images from last month's business trip — can you run them all through OCR and convert them to structured Markdown so I can easily extract the amounts, vendors, and dates for my expense report?"},{"title":"Extract tables from multilingual PDF reports","prompt":"This market research report came in French and has a bunch of data tables throughout — pull out all the text and tables as clean Markdown and make sure the structure is preserved so I can feed it to my analysis tools."},{"title":"Convert form submissions into database records","prompt":"We're getting filled-out forms as PDF images from customers, and I need you to extract the key-value pairs and structure them as Markdown so our backend can parse and store this data in the right database fields."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:43:33.289Z","isFirstParty":false}