# LangParse > LangParse is a document-intelligence API that turns PDFs, scans and images into clean, structured JSON with per-field confidence. It runs AWS-native, with data residency in the region you choose (US or Australia today). Use it to extract invoices, bank statements, contracts, forms and more — with a model you define, or schemaless (fields inferred automatically). ## How to use the API (for agents) - **Base URL:** `https://api.langparse.dev` - **Auth:** send an API key as `Authorization: Bearer ` or `X-Api-Key: `. Keys carry scopes: `parse` (submit + read documents), `manage` (models/routers/sources/destinations), `admin`. New keys default to `parse`. - **Response envelope:** every success response is wrapped — a single resource is `{ "data": { … } }`; a list is `{ "data": [ … ], "meta": { "pagination": { … } } }`. Errors are `{ "statusCode", "statusMessage" }`. - **Parse a document** (one endpoint, async): 1. `POST /api/v1/documents` with a `file` (`{ contents }` base64, `{ url }`, or `{ id }` from an upload) and **exactly one** strategy: `model: "mdl_…"`, `schemaless: true`, `auto: true`, or `router: "rtr_…"`. Optional `pages: [0,2]` (zero-indexed) to limit pages. 2. It returns `202 { "data": { "id", "pollUrl" } }`. 3. Poll `GET /api/v1/documents/{id}` until `status` is `processed`. The result carries `data` (the extracted values) and `fields` (per-field value + `confidence` + bounding boxes). - **Large files:** `POST /api/v1/files` first (base64 / url / presigned), then parse by `file: { id }`. - **Helpers:** `POST /api/v1/models/suggest` (design a schema from samples), `POST /api/v1/models/detect` (classify a file against your models). - **Do not** combine strategies (e.g. `model` + `schemaless`) — that is a 400. Example: ```bash curl https://api.langparse.dev/api/v1/documents \ -H "Authorization: Bearer $LANGPARSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file": { "url": "https://example.com/invoice.pdf" }, "schemaless": true }' ``` ## Docs - [Getting started](https://langparse.dev/docs/): what LangParse is and how to choose model vs schemaless. - [Quickstart](https://langparse.dev/docs/quickstart/): submit a document and poll for the result in a few steps. - [Core concepts](https://langparse.dev/docs/concepts/): models, async parsing, fields & confidence, routers, keys, the response envelope. - [API Reference](https://langparse.dev/docs/api/): every endpoint, parameter and response, with a live console and multi-language code samples. ## Machine-readable - [OpenAPI spec](https://api.langparse.dev/v1/openapi.json): the full OpenAPI 3.1 document. - [Postman collection](https://langparse.dev/langparse.postman_collection.json): import to try every endpoint. ## Product - [Solutions by industry](https://langparse.dev/solutions/): finance, healthcare, insurance, logistics, legal, real estate. - [Use cases](https://langparse.dev/use-cases/): bank statements, PO↔invoice matching, variable layouts, multilingual, classification, human-in-the-loop. - [Security](https://langparse.dev/security/) · [Enterprise](https://langparse.dev/enterprise/) · [Pricing](https://langparse.dev/#pricing) ## Get started - [Sign up (free)](https://app.langparse.dev/signup) - [Contact / sales](https://langparse.dev/contact-us)