Start here: parse your first document in minutes.
The fast path to a working integration. For the full endpoint-by-endpoint detail, jump to the API reference.
Quickstart
1 · Create your account and organization
Sign up and create an organization. Everything in LangParse — documents, keys, billing — is scoped to an organization, and you choose its data-residency region (US or Australia).
2 · Get an API key
In the dashboard, open Settings → API keys and create one. New keys are scoped to parse by default (submit documents and read results); manage and admin scopes require the admin role. The secret is shown once — store it safely and use a separate key per environment so usage is attributable and revocation is surgical.
Send it on every request as a bearer token (or the X-Api-Key header):
Authorization: Bearer YOUR_API_KEY
3 · Find your model id
You parse against a model — a document type and the schema it returns. List the models in your organization to get an id:
curlcurl https://api.langparse.dev/api/models \
-H "Authorization: Bearer $LANGPARSE_API_KEY" 4 · Parse a document
Send the file as base64 (≤ ~12 MB) to the model’s parse endpoint. For larger files, request a presigned upload first via POST /api/v1/models/{modelId}/uploads, PUT the bytes, then parse with the returned sourceKey.
curlcurl https://api.langparse.dev/api/v1/models/$MODEL_ID/parse \
-H "Authorization: Bearer $LANGPARSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileName": "invoice.pdf",
"fileBase64": "JVBERi0xLjcK… (base64 of the file)"
}' Parsing is asynchronous — you get a documentId back right away:
202HTTP 202 Accepted
{
"documentId": "doc_a1b2c3",
"status": "queued",
"pollUrl": "https://api.langparse.dev/api/v1/documents/doc_a1b2c3"
} 5 · Poll for the result
Fetch the document until status becomes processed (it moves through queued → processing → processed, or failed):
curlcurl https://api.langparse.dev/api/v1/documents/doc_a1b2c3 \
-H "Authorization: Bearer $LANGPARSE_API_KEY" The data object is your structured result; fields carries per-field confidence:
200{
"documentId": "doc_a1b2c3",
"modelId": "mdl_invoice",
"status": "processed",
"pageCount": 1,
"data": {
"vendor_name": "Acme Industries",
"invoice_no": "INV-20418",
"total_amount": 12480.00,
"currency": "USD"
},
"fields": [
{ "name": "vendor_name", "value": "Acme Industries", "confidence": "high" },
{ "name": "total_amount", "value": 12480.00, "confidence": "high" }
]
} Core concepts
Five ideas cover almost everything you’ll do with the API:
- Models — A model is a document type plus the schema you want back (the same thing the app UI calls a parser). You parse against a model id.
- Async by design — Parsing returns a documentId immediately (HTTP 202). Poll the document until status is processed — no long-held connections.
- Fields & confidence — Each extracted field comes back with a confidence of high, medium, low, or flagged, plus bounding boxes — so you can auto-accept or route to review.
- Routers — Classify an incoming file and split multi-document PDFs, then send each part to the right model automatically.
- Keys & scopes — API keys carry scopes — parse (submit + read results), manage (configure models/routers/sources), and admin. New keys are parse-only.
Where to go next
- Full API reference — every endpoint, parameter, and response.
- OpenAPI spec — generate a client/SDK or import into Postman.
- Enterprise — data residency, consensus, and BYO S3.
- Talk to us — stuck on something? We’re happy to help.