Skip to Content

Parsing

Convert a document into text, semantic elements, and page metadata.

Use parsing when you need the document itself rather than a predefined set of fields. The openparser@1 response includes plain text, Markdown, pages, elements, relations, text annotations, and assets.

See the OpenParser schema for the complete response contract and field definitions.

Send the document

For a one-off document, upload its bytes in the multipart file field. If you plan to process the same document more than once, upload it with POST /files and pass the returned file_id:

curl -X POST 'https://api.openparser.dev/parse/async' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H "Idempotency-Key: $(uuidgen 2>/dev/null || openssl rand -hex 16)" \
  -F 'request={"ocr_model":"paddleocr-vl-1.6","file_id":"FILE_ID"};type=application/json'

Each request accepts one source: either file or file_id.

Choose a model

Set ocr_model to an ID returned by GET /models/ocr. The default is paddleocr-vl-1.6; the catalog also lists paddleocr-vl-1.8 and the Mistral, Azure, Google, and AWS Textract models.

paddleocr-vl-1.8 uses the PP-DocLayoutV4 layout model and accepts the same options and page price as paddleocr-vl-1.6. glm-ocr was retired on 2026-12-03. Requests that name it fail with 422 unsupported_ocr_model and the message "glm-ocr was retired on 2026-12-03. Use paddleocr-vl-1.6 or paddleocr-vl-1.8."; switch to paddleocr-vl-1.6 or paddleocr-vl-1.8.

The model registry also lists supported options. At present, these are image_block_ocr, chart_recognition, and merge_layout_blocks. Unsupported models or options return 422 Unprocessable Content before work starts.

merge_layout_blocks defaults to false, keeping recognized text aligned with each detected element bounding box. Set it to true when you prefer PaddleOCR-VL's merged recognition behavior and do not require one-to-one text geometry:

{
  "ocr_model": "paddleocr-vl-1.6",
  "ocr_options": {
    "merge_layout_blocks": true
  }
}

When enabled, PaddleOCR-VL may combine text from nearby regions into the first element and leave the remaining merged elements empty.

Choose an output format

output_formatResult
openparser@1Normalized text, layout, and page data. This is the default.
rawThe OCR provider's successful result inside a stable envelope.

Use openparser@1 for new integrations. Choose raw only when you need fields specific to the OCR provider.

Sync vs async

EndpointBehavior
POST /parseWait for a result, or return 202 if the wait limit expires.
POST /parse/asyncReturn 202 as soon as the durable job is admitted.
POST /parse/batchAdmit 1–100 child jobs and return 202.

Use /parse when holding the connection open is convenient. Use /parse/async for queues, webhooks, or any service that prefers to poll. All three endpoints require an Idempotency-Key.

The synchronous endpoint can still return 202 when the wait window expires. In that case, poll the job URL from the Location header.

Billing

Parsing costs $0.001 per successfully parsed page. Failed and indeterminate jobs have no page charge.

On this page