Overview
Azure Document Intelligence prebuilt-layout model, reached through OpenParser. It returns paragraphs with roles (title, section heading, header, footer), tables, selection marks and per-word confidence.
OCRRouter turns OpenParser's openparser@1 output into per-page Markdown plus layout blocks with boxes in pixels (images) or the page unit Azure reports.
Price and limits
- Model ID
- azure/document-intelligence
- Price
- 60 credits / page ($60 per 1,000 pages)
- Max pages per request
- 2,000
- Inputs
- PDF; Images (JPEG, PNG, BMP, TIFF, HEIF per Azure)
- Languages
- 300+ languages (Azure Read/Layout language list)
- Positions (bbox)
- Yes, when the upstream returns them
- Azure: up to 2,000 pages per PDF or TIFF, 500 MB file on paid tier
- OCRRouter catalog limit: 2,000 pages
You pay only for pages that succeed. A failed attempt that falls back to another model is not charged. See pricing.
How OCRRouter calls it
- Endpoint
- POST https://api.openparser.dev/parse (multipart: request JSON + file)
- Upstream model
- OpenParser ocr_model "azure-di-layout" (Azure prebuilt-layout, API 2024-11-30)
- Auth
- Bearer OpenParser API key, server side
- Long jobs
- HTTP 202, then poll the job until it succeeds
Options
What OCRRouter sets on the upstream call. You choose the model, format and pages in your request; vendor-specific options are not passed through.
- ocr_model
- "azure-di-layout" (in the JSON request part)
- output_format
- "openparser@1"
- Idempotency-Key
- A fresh UUID per request, required by OpenParser
- Client options
- None. Clients cannot pass vendor options such as page ranges, features or output format.
Raw response fields
Every field the upstream documents, with its type and meaning taken from the vendor's own reference. Fields marked "read by OCRRouter" are the ones our connector uses; the rest are listed so you know what the engine produces.
What OCRRouter receives: OpenParser openparser@1
OCRRouter never calls Azure directly. OpenParser runs the vendor call and converts the vendor response to its own openparser@1 document, which is the only shape OCRRouter sees. Fields marked used are the ones OCRRouter reads.
Source: OpenParser openparser@1 schema, retrieved 2026-11-19
output_format"openparser@1"- Schema version identifier.Example:
"openparser@1" document_idstring- Stable identifier for the parsed document.
provenanceobject- Provider and model metadata: provider, model, version, operation.Example:
{"provider":"microsoft","model":"prebuilt-layout","version":"2024-11-30"} textstring, read by OCRRouter- Plain text of the whole document in reading order. Spans index into it.
markdownstring, read by OCRRouter- Best-effort Markdown rendering of the whole document. Used as the fallback when elements carry no text.Example:
"# Invoice 1042\n\nItem Qty" pages[]DocumentPage[], read by OCRRouter- Coordinate space and reading order of each page.
pages[].numbernumber, read by OCRRouter- One-based page number. Numbers are contiguous.Example:
1 pages[].widthnumber, read by OCRRouter- Page width in the page's coordinate unit.
pages[].heightnumber, read by OCRRouter- Page height in the page's coordinate unit.
pages[].unit"pixel" | "point" | "inch" | "normalized", read by OCRRouter- Coordinate unit for every bbox on the page.Example:
"pixel" pages[].element_idsstring[], read by OCRRouter- IDs of all elements on the page, including lines and words.
pages[].reading_orderstring[], read by OCRRouter- Ordered subset of element_ids, limited to top-level content.
pages[].confidenceConfidence- Optional page-level OCR aggregate.
pages[].qualityPageQuality- Optional image-quality scores, defects and metrics, separate from confidence.
elements[]DocumentElement[], read by OCRRouter- Text, tables, figures and other semantic content.
elements[].idstring, read by OCRRouter- Element ID, referenced from pages[].reading_order.
elements[].kindstring, read by OCRRouter- One of text, table, figure, formula, key_value, query_answer, section, selection_mark, signature, barcode, link, stamp, other.Example:
"text" elements[].rolestring, read by OCRRouter- For text elements: heading, paragraph, line, word, page_header, page_footer and similar.
elements[].textstring, read by OCRRouter- Element text.
elements[].markdownstring, read by OCRRouter- Element text as Markdown, when provided. Read before text.
elements[].spans[]{start,end}[]- UTF-16 offsets into the document text, end exclusive.
elements[].locations[].page_numbernumber, read by OCRRouter- Page the location is on.Example:
1 elements[].locations[].bbox{left,top,right,bottom}, read by OCRRouter- Axis-aligned box in page-local coordinates; right and bottom are exclusive.
elements[].locations[].polygon{x,y}[]- Tighter outline when the source provides one.
elements[].confidence.scorenumber, read by OCRRouter- Score normalised to 0 to 1.
elements[].confidence.scopestring- What the score measures: detection, recognition, classification, geometry, answer or quality.
elements[].confidence.calibratedboolean- Defaults to false. Uncalibrated scores should not be compared across providers or scopes.
elements[].confidence.source_valuenumber- The provider's original score.
elements[].confidence.source_scalestring- Scale of the original score: zero_to_one, zero_to_hundred, log_probability or unknown.
elements[].row_countnumber, read by OCRRouter- Table rows.
elements[].column_countnumber, read by OCRRouter- Table columns.
elements[].cells[].row_indexnumber, read by OCRRouter- Cell row position.
elements[].cells[].column_indexnumber, read by OCRRouter- Cell column position.
elements[].cells[].row_spannumber- Rows the cell covers.
elements[].cells[].column_spannumber- Columns the cell covers.
elements[].cells[].textstring, read by OCRRouter- Cell text.
relations[]DocumentRelation[]- Directed links between elements, such as containment and captions.Example:
{"type":"contains","from_id":"...","to_id":"..."} text_annotations[]TextAnnotation[]- Language and style metadata over spans of text.
assets[]DocumentAsset[]- Page and figure images.
Real response captured 2026-11-19 from POST /parse on a small 600 x 260 PNG. Trimmed to the first two reading-order elements, one relation, and the first element IDs.
{"output_format": "openparser@1","document_id": "b1c4a829aacf83ef0491f8b0f0a48e5c","provenance": {"provider": "microsoft","model": "prebuilt-layout","version": "2024-11-30","operation": "analyze_document"},"text": "# Invoice 1042\n\nItem Qty\n\nPaper\n\n2\n","markdown": "# Invoice 1042\n\nItem Qty\n\nPaper\n\n2","pages": [{"number": 1,"source_page_number": 1,"width": 600,"height": 260,"unit": "pixel","rotation_degrees": 0.9771592020988464,"languages": [],"element_ids": ["azure-paragraph-0","azure-paragraph-1","azure-paragraph-2","azure-paragraph-3","..."],"reading_order": ["azure-paragraph-0","azure-paragraph-1","azure-paragraph-2","azure-paragraph-3"]}],"elements": [{"id": "azure-paragraph-0","locations": [{"page_number": 1,"bbox": { "left": 29, "top": 20, "right": 192, "bottom": 45 },"polygon": [{ "x": 29, "y": 21 },{ "x": 192, "y": 20 },{ "x": 192, "y": 44 },{ "x": 30, "y": 45 }]}],"source": {"native_id": "/paragraphs/0","native_type": "paragraph","native_label": "title"},"kind": "text","role": "document_title","text": "Invoice 1042","spans": [{ "start": 0, "end": 14 }],"languages": []},{"id": "azure-paragraph-1","locations": [{"page_number": 1,"bbox": { "left": 30, "top": 69, "right": 178, "bottom": 98 },"polygon": [{ "x": 30, "y": 69 },{ "x": 178, "y": 71 },{ "x": 177, "y": 98 },{ "x": 30, "y": 95 }]}],"source": { "native_id": "/paragraphs/1", "native_type": "paragraph" },"kind": "text","role": "paragraph","text": "Item Qty","spans": [{ "start": 16, "end": 24 }],"languages": []}],"text_annotations": [],"relations": [{"type": "contains","from_id": "azure-page-1-line-0","to_id": "azure-page-1-word-0"}],"assets": []}The vendor's own response: Azure AnalyzeResult
What Azure returns to OpenParser from prebuilt-layout. OCRRouter never sees this JSON; it is shown so you know where the openparser@1 values come from (paragraphs become text elements, paragraph role title becomes document_title).
Source: Azure Get Analyze Result REST reference, retrieved 2026-11-19
statusstring- Operation status: notStarted, running, succeeded or failed.Example:
"succeeded" createdDateTimedate-time- UTC time the analyze operation was submitted.
lastUpdatedDateTimedate-time- UTC time the status was last updated.
errorDocumentIntelligenceError- Error encountered during analysis.
analyzeResult.apiVersionstring- API version used to produce the result.Example:
"2024-11-30" analyzeResult.modelIdstring- Document model ID used to produce the result.Example:
"prebuilt-layout" analyzeResult.stringIndexTypestring- Method used to compute string offset and length.Example:
"textElements" analyzeResult.contentstring- Concatenation of all textual and visual elements in reading order.
analyzeResult.contentFormatstring- Format of content: text or markdown (set with outputContentFormat=markdown).Example:
"text" analyzeResult.pages[].pageNumberinteger- 1-based page number.Example:
1 analyzeResult.pages[].anglenumber- Orientation angle, showing whether the page is rotated.Example:
0 analyzeResult.pages[].widthnumber- Page width in unit.Example:
8.5 analyzeResult.pages[].heightnumber- Page height in unit.Example:
11 analyzeResult.pages[].unitstring- Unit of width, height and polygons: inch for PDF, pixel for images.Example:
"inch" analyzeResult.pages[].words[]DocumentWord[]- Words with content, polygon, confidence and span.Example:
{"content":"CONTOSO","confidence":1} analyzeResult.pages[].lines[]DocumentLine[]- Lines with content, polygon and spans.
analyzeResult.pages[].selectionMarks[]DocumentSelectionMark[]- Check boxes with state (selected or unselected), polygon, confidence and span.Example:
"unselected" analyzeResult.pages[].spans[]{offset,length}[]- Where the page sits in content.
analyzeResult.paragraphs[].rolestring- Paragraph role: title, sectionHeading, footnote, pageHeader, pageFooter or pageNumber. Absent for body text.Example:
"sectionHeading" analyzeResult.paragraphs[].contentstring- Paragraph text.
analyzeResult.paragraphs[].boundingRegions[]BoundingRegion[]- pageNumber plus polygon: x, y vertices clockwise from the left, relative to the page's top-left.
analyzeResult.tables[].rowCountinteger- Number of rows.Example:
4 analyzeResult.tables[].columnCountinteger- Number of columns.Example:
8 analyzeResult.tables[].cells[].kindstring- Cell kind, for example columnHeader; content cells have no special kind.Example:
"columnHeader" analyzeResult.tables[].cells[].rowIndexinteger- Row of the cell, 0-based.Example:
0 analyzeResult.tables[].cells[].columnIndexinteger- Column of the cell, 0-based.Example:
0 analyzeResult.tables[].cells[].rowSpaninteger- Rows the cell spans.Example:
1 analyzeResult.tables[].cells[].columnSpaninteger- Columns the cell spans.Example:
1 analyzeResult.tables[].cells[].contentstring- Cell text.Example:
"DATE" analyzeResult.figures[]DocumentFigure[]- Figures with id, boundingRegions, spans, elements, caption and footnotes.
analyzeResult.sections[]DocumentSection[]- Hierarchical sections of the document.
analyzeResult.styles[]DocumentStyle[]- Font styles, including isHandwritten for handwritten spans.Example:
{"isHandwritten":true} analyzeResult.keyValuePairs[]DocumentKeyValuePair[]- Extracted key-value pairs.
analyzeResult.languages[]DocumentLanguage[]- Detected languages.
analyzeResult.documents[]AnalyzedDocument[]- Extracted documents (prebuilt and custom models).
analyzeResult.warnings[]DocumentIntelligenceWarning[]- Warnings encountered.
Abridged from Microsoft's documented sample response for Get Analyze Result (API 2024-11-30). That sample uses prebuilt-invoice; prebuilt-layout returns the same AnalyzeResult shape.
{"status": "succeeded","createdDateTime": "2021-09-24T13:00:46Z","lastUpdatedDateTime": "2021-09-24T13:00:49Z","analyzeResult": {"apiVersion": "2024-11-30","modelId": "prebuilt-invoice","stringIndexType": "textElements","contentFormat": "text","content": "CONTOSO LTD.\nINVOICE\nContoso Headquarters\nINVOI…","pages": [{"pageNumber": 1,"angle": 0,"width": 8.5,"height": 11,"unit": "inch","words": [{"content": "CONTOSO","polygon": [0.5911,0.6857,1.7451,0.6857,1.7451,0.8664,0.5911,0.8664],"confidence": 1,"span": { "offset": 0, "length": 7 }}],"selectionMarks": [{"state": "unselected","polygon": [4.3231,5.6279,4.7562,5.6279,4.7562,5.8654,4.3231,5.8654],"confidence": 0.212,"span": { "offset": 946, "length": 12 }}],"lines": [{"content": "CONTOSO LTD.","polygon": [0.5911,0.6857,2.3181,0.6857,2.3181,0.8664,0.5911,0.8664],"spans": [{ "offset": 0, "length": 12 }]}],"spans": [{ "offset": 0, "length": 958 }]}],"tables": [{"rowCount": 4,"columnCount": 8,"cells": [{"kind": "columnHeader","rowIndex": 0,"columnIndex": 0,"rowSpan": 1,"columnSpan": 1,"content": "DATE","boundingRegions": [{"pageNumber": 1,"polygon": [0.4932, 5.329, 1.3011, 5.3213]}]}]}]}}How it maps to OCRRouter output
- pages[] sorted by number
- One Markdown string and one layout page per page
- pages[].reading_order (else element_ids)
- Block order on the page
- elements[].kind + role containing table
- table block
- kind/role containing formula or equation
- formula block
- kind/role containing figure, image or picture
- image block
- kind/role containing heading or title
- heading block, text prefixed with # (level 1 to 6)
- anything else
- paragraph block
- elements[].markdown, else text
- Block text
- cells[] with row_count/column_count
- GitHub Markdown table, first row as header
- locations[].bbox on that page
- bbox [left, top, right, bottom] in pages[].unit
- pages[].width/height/unit
- Layout page size and unit
- confidence.score
- Block confidence 0 to 1, or null
- No element text on any page
- Document markdown (else text) returned as page 1, no layout
- HTTP 202 with job
- Poll GET /jobs/{id} (or Location) with backoff 1 to 5 s until succeeded or failed
- Azure paragraph role title
- OpenParser role document_title, OCRRouter heading
- Azure paragraphs
- OpenParser text elements with role paragraph
The unified output is described in Response format.
Example request
curl https://api.ocrrouter.ai/v1/ocr \
-H "Authorization: Bearer $OCRROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "azure/document-intelligence",
"file_url": "https://example.com/invoice.pdf",
"format": "json"
}'Sources
Vendor documentation read on 2026-11-19.