01

What OCR returns

OCR looks at a page image and proposes characters and, on many engines, boxes. That is the right tool for a scan, a photo, or a slide that was exported as pictures.

The string by itself does not say which column came first, which line is a heading, or which number belongs to which table header.

02

What parsing adds

A parse records the page index, the order of blocks, and the block type. Markdown is the readable view. DocIR JSON keeps the page and block ids so a citation can point back.

DocParse stores the route, parser version, and warnings on the job. A text-layer route and an OCR route are different evidence, and the record should say which one ran.

03

Which route the workspace allows

Text-based files can use the deterministic trial: 20 documents, 200 MB per month, one active job, and 20 MB per upload.

Image parsing and suspected scans require an approved paid workspace. The caller does not choose an internal model name. The server records the route.

04

What to read on the job

A digital PDF with a text layer stays on the deterministic container route. DocIR then records schemaVersion docir.v1, metadata.route, and metadata.warnings. The text-layer path adds the warning that the digital PDF text-layer fast path was used.

An image upload, fastMode, highFidelity, or suspectedScanned is rejected on a trial workspace. The API responds with 403 and the message that trial workspaces use deterministic parsing only. A PDF made of page images, uploaded without those flags, can still enter the container. An empty page may then carry the block warning that OCR fallback was used.

The job field route is one of tomarkdown, image-vision, office-ooxml, container, external-ocr, or reject. The caller does not send an internal model name. A normal text-based PDF, DOCX, XLSX, HTML, or CSV records container. PPTX records office-ooxml. fastMode is a paid-workspace flag, and it is the flag that can reach the tomarkdown route.

  • OCR output is characters. A parse also has pages, block ids, and a route.
  • metadata.route is container for a normal text-based PDF.
  • pageIndex 0 is the first page in the file.
  • A 403 on the trial means the request asked for image, Fast, or layout-aware processing.
05

The file to send

Send a digital PDF that has a text layer. This trial call stays on the deterministic container route. metadata.route is container.

The text-layer path adds the warning that the digital PDF text-layer fast path was used. An image upload on the trial returns HTTP 403 before any OCR route runs.

  • The response has pages and block ids, along with the characters.
  • Leave suspectedScanned off the trial request.
  • Read metadata.warnings together with the route.
export DOCPARSE_URL="https://docparse.genedai.me"
export DOCPARSE_API_KEY="your_key"

curl -fsS -X POST \
  "$DOCPARSE_URL/v1/parse?wait=true" \
  -H "Authorization: Bearer $DOCPARSE_API_KEY" \
  -F "file=@document.pdf" \
  -F "mode=both" \
  -o result.json

jq -r '.result.markdown' result.json
jq '.result.document.schemaVersion, .result.document.pages[0].blockIds' result.json
jq '.result.manifest.decision.route, .result.manifest.parserVersion' result.json

Frequently asked questions

Questions this guide answers

Is OCR the same as document parsing?

OCR reads characters from pixels. Document parsing keeps those characters on a page, in a reading order, and inside a table when the file has one. DocParse records the route that produced the text on the job.

Does every PDF need OCR?

A digital PDF with a usable text layer is parsed from that layer. The text-layer path skips OCR on empty pages and says so in metadata.warnings. OCR is for pages that are images.

Can the free trial run OCR?

The free workspace rejects image uploads, fastMode, highFidelity, and suspectedScanned with a 403. A PDF of page images can still be parsed on the deterministic container, and an empty page may include a local OCR fallback warning.