CLI, TypeScript SDK, Python SDK

Document parsing CLI for agents and CI

openparser parse sync ./doc.pdf. Switch OCR models, poll jobs, and extract JSON from a shell agents already know. SDKs mirror the same surface for Node and Python.

npm i -g @openparser/cli@openparser/sdkpip install openparser
MUTUAL NON-DISCLOSURE AGREEMENT
This Agreement is made on 2 September 2026 between Nimbus Cloud GmbH, 42 Speicherstrasse, Berlin ("Nimbus") and Acme Operations GmbH, 8 Marktgasse, Vienna ("Acme").
4. Term and termination
This Agreement remains in force for three (3) years from the date above. Either party may end it with thirty (30) days' written notice.
5. Governing law
This Agreement is governed by Austrian law. The courts of Vienna have exclusive jurisdiction.
Jonas Weber
Jonas Weber
CEO · Nimbus Cloud GmbH
Date: 02.09.2026
M. Fernández
Marta Fernández
COO · Acme Operations GmbH
Date: 02.09.2026
Nimbus × Acme · ConfidentialPage 2 of 2
fx=SUM(E4:E8)
ABCD
1
Payroll · September 2026
2 
3456789
EmployeeHoursGrossNet
J. Carter1688,333.336,212.40
L. García1607,100.005,402.75
A. Okafor1726,880.005,236.10
M. Fernández1505,400.004,180.20
S. Tanaka1647,950.005,970.35
Total81435,663.3327,001.80
Approved by Finance · 30 Sep 2026. Net pay is after income tax and social security. Transfers scheduled for 1 Oct 2026.
SeptemberAugustSummary
NNimbus Cloud GmbHCloud infrastructure
INVOICE
From
Nimbus Cloud GmbH
42 Speicherstrasse · 10115 Berlin
Bill to
Acme Operations GmbH
8 Marktgasse · 1010 Vienna
Invoice no.INV-2026-0718
Issued30 July 2026
Due13 August 2026
DescriptionQtyAmount
Cloud hosting subscriptionJuly 2026 · Production1€1.200,00
Subtotal€1.200,00
VAT 20%€240,00
Total due€1.440,00
Payment details
Bank transfer · IBAN DE89 3704 0044 0532 0130 00
Reference INV-2026-0718
Nimbus Cloud GmbH · Fictional demonstration invoicePage 1 of 1
CALIFORNIA COMMERCIAL LEASE AGREEMENT
This Lease Agreement made the 2025-05-20, by and between Hope Mante [name of lessor], of 925 The Mews [street address], hereinafter referred to as "Lessor", and Reilly Group [name of lessee], hereinafter referred to as "Lessee".
1. DESCRIPTION OF LEASED PREMISES
The Lessor agrees to lease to the Lessee 2448 square feet of Industrial Space located at 80369 Efren Burg, State of California.
2. TERM OF LEASE
The term of this Lease shall be 4 year(s) 5 month(s), commencing on the 20 May 2025 and expiring at midnight on 20 October 2029.
3. BASE RENT
The net monthly payment shall be 8646 dollars per month. A security deposit of 1395 dollars is required.
☑ Lessee may not renew the Lease.
☐ Lessee may renew with written notice 60 days prior.
Page 5 of 8
REPUBLIC OF ALDORIAIDENTITY CARD
Surname
MANTE
Given names
HOPE ELISE
Date of birth
14.03.1988
Sex
F
Document no.
AX4821937
Date of expiry
22.09.2031
H. Mante
Address
925 THE MEWS, ALDOR CITY
Issuing authority
CITY OF ALDOR · 22.09.2021
Height · Eyes
168 CM · BROWN
IDALDAX48219376<<<<<<<<<<<<
8803145F3109225ALD<<<<<<<<4
MANTE<<HOPE<ELISE<<<<<<<<
{
"invoice_no": "INV-2026-0718","due_date": "2026-08-13","total_due": 1440.00}

Install CLI and SDKs

Global CLI for agents and CI. SDK packages for application code. All three speak the same API surface.

npm i -g @openparser/cli

Global openparser binary for parse, jobs, models, and extract subcommands. Named auth profiles store API keys outside your repo.

npm install @openparser/sdk

TypeScript SDK with the same methods as the CLI: parse sync and async, job polling, model discovery, and schema extraction.

pip install openparser

Python client for notebooks, ETL, and agent frameworks. Identical request and response shapes as Node.

CLI parse commands

The CLI calls the same /parse and /extract routes as the SDKs. Sync for quick files, async for large PDFs, batch for folders.

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…"
}

CLI and SDK parity

Agents can shell out to openparser. Applications import the SDK. Both hit the same hosted API with the same ocr_model and output_format fields.

Agent-friendly CLI

Structured stdout and JSON flags fit tool-calling loops. Parse a file, pipe markdown, or dump the full OpenParser document graph for the next agent step.

Named auth profiles

Store API keys with openparser auth login. Profiles live under ~/.config/openparser. Switch staging and prod with --profile or OPENPARSER_PROFILE.

Model discovery

openparser models ocr lists hosted engines with retail prices before you enqueue work. Same catalog as GET /models/ocr.

Parity with SDKs

Every CLI subcommand maps to an SDK method. Move from a shell prototype to typed application code without relearning the API.

Sync, async, and batch

Parse one file synchronously, queue a large PDF, or submit a batch directory. Poll jobs with the same ids the REST API returns.

Typed JSON stdout

Emit markdown or the full ParsedDocument JSON. Extraction results include grounding citations tied to element_id values from the parse.

Hosted parsing rates

Install the CLI or SDKs at no charge. Hosted parsing bills per page; open-weight hosted models start at $1 per 1,000 pages with $10 free credits.

free credits
$10

At signup. About 10,000 pages on open-weight models.

pay per page
$1/ 1,000 pages

On open-weight models. Cloud OCR bills at its own page rate.

extraction
Per token

Billed on the tokens of the llm_model you pick.

  • CLI and SDKs are free to install
  • Hosted parsing metered per page
  • Open-weight hosted from $1 / 1,000 pages
  • $10 credits at signup
  • Same page prices as the REST API
Create an API key

CLI and SDK FAQ

Install paths, agent workflows, model flags, and where the client guides live.

How do I install the OpenParser CLI?

Run npm i -g @openparser/cli. Authenticate with openparser auth login or set OPENPARSER_API_KEY. Named profiles live under ~/.config/openparser.

Does the CLI match the REST API?

Yes. Subcommands call the same /parse, /jobs, /extract, and /models/ocr routes. Request fields like ocr_model and output_format are identical.

Can agents use the CLI instead of the SDK?

Yes. The CLI is designed for tool-calling agents that already run shell commands. Use --json for machine-readable ParsedDocument output.

Is there a Python client?

pip install openparser installs the Python SDK with the same API surface as @openparser/sdk for Node. Both return the same OpenParser documents.

How do I switch OCR models from the CLI?

Pass --ocr-model or set ocr_model in the request JSON for parse commands. Run openparser models ocr to list available ids and retail prices.

Does the CLI work in CI?

Yes. Store an API key in a CI secret, configure a named profile, and run openparser parse async or batch in pipelines. Poll jobs until complete before downstream steps.

CLI

Run openparser parse from the shell

Run npm i -g @openparser/cli, openparser auth login, then openparser parse sync ./doc.pdf. Use @openparser/sdk or the Python client for in-process types.