api.openparser.dev

OpenParser REST API

POST multipart files to /parse and /extract on api.openparser.dev. Set ocr_model and output_format openparser@1 on parse. Sync routes wait for a result and can return a job when the wait window expires. Async and batch routes return a job id to poll with GET /jobs/{id}.

api.openparser.devAuthorization: Bearerocr_model + OpenParser output

Parse, extract, and jobs

Three route groups on one host. Parse turns files into layout elements. Extract fills your JSON schema. Jobs carry async and batch results.

Parse

POST /parse with a multipart file and request JSON. Returns ParsedDocument with pages, elements, text, and markdown. Geometry and scoped OCR confidence depend on the selected model. Change ocr_model without changing response fields.

Extract

POST /extract against a parse job or uploaded file. Supply a JSON schema and llm_model. Responses include field values with citations tied to element_id values from the parse output.

Jobs

Async and batch routes return 202 with a job id. GET /jobs/{id} for status and results. GET /jobs lists recent work. GET /files/{id}/content retrieves stored bytes.

REST endpoints

Parse and extract each expose sync, async, and batch variants. Job routes handle polling, listing, and file retrieval.

Install
$ npm i @openparser/sdk
$ pip install openparser-sdk
POST/parserequest
curl https://api.openparser.dev/parse \
  -H "Authorization: Bearer $OPENPARSER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F 'request={"ocr_model": "paddleocr-vl-1.6"};type=application/json' \
  -F "file=@invoice.pdf"
200 · resultresponse
{
  "document_id": "doc_3f9a2c",
  "elements": [
    {
      "id": "elem-total",
      "kind": "text",
      "text": "Total due: €1.440,00",
      "locations": [{
        "page_number": 1,
        "bbox": { "left": 468, "top": 712, "right": 1118, "bottom": 760 }
      }],
      "confidence": { "score": 0.98 }
    }
  ],
  "markdown": "# INVOICE\n…"
}

Hosted OCR model catalog and per-page prices are on Models & pricing. The openparser@1 output contract is on openparser@1 schema.

OpenParser API FAQ

Authentication, processing modes, output format, and client libraries.

How do I authenticate?

Send Authorization: Bearer op_live_… on every request. Create keys in Studio under API keys. The CLI stores the same token after openparser auth login.

When should I use sync vs async?

POST /parse and POST /extract wait for a result but can return 202 when the wait window expires. Poll the job URL in the Location header in that case. POST /parse/async and /extract/async return 202 with a job id; poll GET /jobs/{id}. Batch routes queue up to 100 items in one request.

What is the output format?

Set output_format to openparser@1 on parse requests. ParsedDocument responses include document_id, provenance, pages, elements, text, markdown, relations, text_annotations, and assets. Extraction returns your schema JSON plus grounding citations into those elements.

Are there official SDKs?

Yes. @openparser/sdk for TypeScript, the openparser package on PyPI for Python, and @openparser/cli for shell and agent workflows. All clients target the same REST surface documented in the API reference.

API setup

Get started with the API

Create a key in Studio, send Authorization: Bearer on requests to api.openparser.dev, and set output_format openparser@1 on POST /parse.