document extraction api

Fill your JSON schema
with cited values.

Parse a PDF into typed blocks, then call /extract with your schema. You get grounded JSON and block citations for every field you define.

Citations per fieldParser and LLM separateSync, async, or batch
1
2
3
b1 title
PAYMENT AUTHORIZATION
b2 field
Account
4021-8837
b3 field
Date
May 2025
b4 table
ItemAmount
Consulting$4,636.40
Adjustment-$318.20
Total$4,318.20
b5 checkbox
PaidPending
b6 signature
readingpaddleocr-vl-1.6
analyzing
0/6 blocks
/ api

Extract fills your schema. Citations name blocks.

Use /extract after /parse, or submit extract jobs async and in batch. Poll /jobs for status and results.

endpointsapi.openparser.dev
  • Full API reference
POST/extractrequest
curl https://api.openparser.dev/extract \
  -H "Authorization: Bearer op_live_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F 'request={"parse_job_id":"7f9f2f3d-0f8a-4f0a-9a2b-2f6f0a7d2c11","llm_model":"openai/gpt-5.6-terra","schema":{"account_no":"string","total":"number"},"grounding":"field"};type=application/json'
response200 · 2.3s
{
  "output": { "account_no": "4021-8837", "total": 4318.20 },
  "parsed_document": {
    "output_format": "openparser@1",
    "document_id": "doc_3f9a2c",
    "page_count": 1,
    "markdown": "| Item | Amount |\n| …",
    "blocks": [],
    "regions": [],
    "contents": [],
    "chunks": []
  },
  "llm_model": "openai/gpt-5.6-terra",
  "grounding": {
    "mode": "field",
    "fields": [
      { "path": "total",
        "citations": [
          { "block_index": 1, "page_number": 1,
            "bbox": { "left": 14, "top": 53,
                       "right": 146, "bottom": 123 },
            "source_type": "table",
            "granularity": "block",
            "confidence": 0.98 }
        ] }
    ]
  },
  "attempts": []
}
/ console

Test schema extraction in the playground.

Upload a document, define fields, and inspect grounded JSON with block citations before you wire production calls.

openparser.dev/playgroundsigned in
playgroundno code
statement.pdf1 page · 48 KB
parsePaddleOCR-VL-1.6open
extractClaudeGPT-4oLlamalocalany LLM
Run{ total: "$4,318.20" } b4
/ output

Grounded JSON your agents can audit.

Typed blocks carry ids. Extraction names those ids instead of inventing coordinates, so an invalid citation resolves nowhere.

Schema you control

You define the JSON shape. The API fills vendor_name, line_items, totals, or any fields your pipeline expects.

b1
0.99
b4
0.98
b6
0.70

Validation-friendly

Typed output and per-field citations give you concrete checks for schema validation and human review.

Parser and LLM split

ocr_model handles layout and OCR. llm_model handles extraction. Change either without rewriting the other step.

schema {
total
}
{
total: "$4,318"
}

Choose the extraction LLM

Point a schema at a parse and fill it with Claude, GPT, or a model you host. Parsing does not lock the extract model.

b4

Grounded output

grounding.fields[] ties each value to block_index and bbox from the parse. You audit values against the blocks they cite.

b2b4b6
x, y, w, h

No invented geometry

Citations reference block_index values from the parsed document. A missing id fails your lookup instead of pointing at empty space.

/ pricing

Parse pages. Pay tokens on extract.

The first 1,000 parsed pages are free. After that, parsing is $1 per 1,000 pages. Extraction adds the token cost of whichever llm_model you pick.

parse
$1/ 1,000 pages
first 1,000 pages free
+
extract
Per token
billed by llm_model
  • Per-page parse pricing
  • Per-token extraction
  • Sync, async, batch
  • Block citations
  • API keys in console
Create an API key
/ questions

Extraction API, explained.

Schema input, citations, models, and billing for structured document extraction.

What do I send to the extraction endpoint?

You send a parse job id (or parse a file first), a JSON schema, an llm_model, and a grounding mode. The API fills your schema from the parsed blocks and returns citations per field.

How do block citations work?

Each extracted field can list one or more citations with block_index, page_number, bbox, source_type, and confidence. You map block_index back to the parsed document to highlight the source region.

Can I pick the parser and extraction model separately?

Yes. Parsing uses ocr_model (PaddleOCR-VL-1.6 today). Extraction uses llm_model, which you set independently on the extract request.

Does extraction cost the same as parsing?

No. Parsing is priced per page ($1 per 1,000 pages after the first 1,000 free). Extraction adds the token cost of whichever llm_model you choose.

Can I run extraction sync, async, or in batch?

Yes. /extract, /extract/async, and /extract/batch mirror the parse endpoints. Poll /jobs/{id} for async and batch results.

What happens when a citation block id is missing?

Citations reference block_index values from the parsed document. If the model names a block that does not exist, your lookup fails and you catch the mismatch before shipping.

/ extract on your docs

Run your schema
in the playground.

Upload an invoice or statement, define fields, and inspect grounded JSON with block citations before you wire up production calls.