v2

latestOpenAPI 3.1.02026-07-262937191.0 MB
ocr

OCR

OCR

post/v1/ocr

Request body

modelstring nullable required
include_image_base64boolean nullable

Include image URLs in response

image_limitinteger nullable

Max images to extract

image_min_sizeinteger nullable

Minimum height and width of image to extract

document_annotation_promptstring nullable

Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided.

table_format'markdown' | 'html' nullable
extract_headerboolean

Extract the page header into the response's header field and remove it from the markdown content

extract_footerboolean

Extract the page footer into the response's footer field and remove it from the markdown content

include_blocksboolean

Return paragraph-level bounding boxes for all content blocks in the response

confidence_scores_granularity'word' | 'page' nullable

Granularity for confidence scores: 'page' (aggregate only), 'word' (per-word scores). Defaults to None (no confidence scores) to keep response payload small.

Example request

{
  "bbox_annotation_format": {
    "type": "text"
  },
  "document_annotation_format": {
    "type": "text"
  }
}

Response

Successful Response

modelstring required

The model used to generate the OCR.

document_annotationstring nullable

Formatted response in the request_format if provided in json str