Claims processing automation: How to automate insurance claims intake
Table of contents
Structured output with per-field confidence scores through the Nutrient Data Extraction API.
An auto claim rarely arrives as neat, separate files. More often, it shows up as one scanned PDF containing the claim form, a copy of the driver’s license, two repair invoices, a few photos of the car, and a letter from the other driver’s insurer. Before anyone can assess the claim, someone has to pull that file apart, work out what each document is, and check that the details hold together.
Sorting the pages is tedious. Checking them is slower. Is the policy number the same everywhere? Is the name on the license the person who filed the claim? Do the photos show the damage the form describes?
This post applies claims processing automation to a single claim. Our post on mailroom automation already covers sorting a batch of mixed mail, so we’ll move quickly through that part and focus on what’s specific to claims: spotting missing documents and catching details that don’t agree, before a handler opens the file.
What is claims processing automation?
Claims processing automation, often just called claims automation, uses software to handle the routine steps between receiving an insurance claim and paying it: separating and labeling documents, extracting key details, checking them against each other, and routing the claim. Claims that pass every check go straight to assessment. The rest go to a handler with a list of reasons.
Most teams start automated claims processing with intake, because that’s where most of the manual work is. Automating intake cuts the touches per claim, gets the customer a first response sooner, and runs the same checks on every claim.
The sample packet
Our test packet is a 14-page auto claim, scanned as one PDF:
| Pages | Document | Why it’s tricky |
|---|---|---|
| 1–2 | Claim form | Page 2 has no header, so it looks like a new document |
| 3 | Driver’s license copy | Mostly image, very little text |
| 4–5 | Repair invoice, body shop A | |
| 6 | Repair invoice, body shop B | Same invoice template as shop A; only the logo and address differ |
| 7–9 | Damage photos | One photo per page, no text |
| 10 | Police report reference | A short letter that’s easy to mistake for correspondence |
| 11–12 | Letter from the other insurer | |
| 13 | Bank details form | |
| 14 | Blank page | Scanner separator sheet |
We hid two problems in it. The claim form says Jonathan Miller and the license says Jon A. Miller, which should pass. The claim form also says the car was hit from the front, but all three photos show rear damage. That one should go to a person.

All scores below are illustrative. Yours will differ.
Split and classify the claim packet
Two calls to the Data Extraction API sort the packet. Both run on the Nutrient document decision model, which reads the page image as well as the text. Split reads the packet page by page and decides where each new document starts, and the page image helps it tell body shop A’s invoice from shop B’s. Classify then labels each document against labels you write yourself. The mailroom post covers both calls in detail; here’s the short version with claim labels.
Split needs to be enabled for your workspace. Without it, the endpoint returns a 404.
import base64, io, json, mimetypes, osimport requestsfrom pypdf import PdfReader, PdfWriter
API = "https://api.nutrient.io"HEADERS = {"Authorization": f"Bearer {os.environ['NUTRIENT_API_KEY']}"}PACKET = "claim-packet.pdf"reader = PdfReader(PACKET)
def post(path, headers=HEADERS, timeout=120, **kwargs): r = requests.post(f"{API}{path}", headers=headers, timeout=timeout, **kwargs) r.raise_for_status() return r.json()
def document_pdf(doc): writer = PdfWriter() for i in range(doc["startPage"] - 1, doc["endPage"]): writer.add_page(reader.pages[i]) buffer = io.BytesIO() writer.write(buffer) return ("document.pdf", buffer.getvalue(), "application/pdf")
LABELS = [ {"label": "claim form", "description": "An auto insurance claim form filled in by the policyholder"}, {"label": "driver's license", "description": "A driver's license or other photo ID"}, {"label": "repair invoice", "description": "An invoice or estimate from a body shop or garage"}, {"label": "damage photo", "description": "A photo of damage to a vehicle"}, {"label": "police report", "description": "A police report or police reference letter"}, {"label": "correspondence", "description": "A letter or email from another insurer or a third party"}, {"label": "bank details", "description": "A form with bank details for the claim payment"}, {"label": "other", "description": "Anything else, including blank pages"},]
with open(PACKET, "rb") as f: documents = post("/extraction/split", files={"file": f}, data={"instructions": json.dumps({"options": {"output": "json"}})} )["output"]["segments"]
for doc in documents: top = post("/extraction/classify", files={"file": document_pdf(doc)}, data={"instructions": json.dumps({"labels": LABELS})} )["output"]["classification"] doc["label"], doc["label_score"] = top["label"], top.get("score", 0)
by_label = {}for doc in documents: by_label.setdefault(doc["label"], []).append(doc)Page 2 stays with the claim form, and page 6 comes back as its own invoice with a boundary score of 0.81. Split’s default boundary threshold is 0.8, so 0.81 still starts a new document, but only just. That’s the closest call in the packet, and it falls below the 0.85 THRESHOLD you set in the next step, so the routing step flags it. Keep the score; you’ll use it when you route the claim. (Split may return the photos as one document or three. Either way, each comes back labeled as a damage photo.)
Now plain code can answer the first intake question. Is anything missing? Each claim type has a list of documents it needs:
THRESHOLD = 0.85 # for boundary and label scores; tune it on your own claims.
REQUIRED = {"claim form", "driver's license", "repair invoice", "damage photo", "bank details"}found = {d["label"] for d in documents if d["label_score"] >= THRESHOLD}missing = REQUIRED - found
if missing: print("Route to intake handler. Missing:", ", ".join(sorted(missing))) raise SystemExitOur packet has everything, so missing is empty. A claim without photos or a bank details form would stop here, with a list of what’s missing that the handler can pass on to the customer. A required label also counts as missing when no document with that label meets the threshold, so the handler confirms it before anything gets extracted. If classify returns no score for a document, the code treats it as unconfirmed for the same reason.
Extract claim data and cross-check it
Next, extract what the assessor needs from the documents that hold it, with citations turned on so every value comes back with where it was found on the page. (Our post on catching hallucinated values in document extraction covers how to use citations to catch misread values.)
CLAIM_FORM_SCHEMA = {"type": "object", "properties": { "claimant_name": {"type": "string"}, "policy_number": {"type": "string"}, "incident_date": {"type": "string", "format": "date"}, "amount_claimed": {"type": "number"}, "damage_description": {"type": "string"},}}LICENSE_SCHEMA = {"type": "object", "properties": {"name": {"type": "string"}}}INVOICE_SCHEMA = {"type": "object", "properties": { "policy_number": {"type": "string"}, "invoice_date": {"type": "string", "format": "date"}, "total": {"type": "number"},}}
def extract(doc, schema): return post("/extraction/extract", headers={**HEADERS, "x-nutrient-api-version": "2026-05-25", "x-nutrient-engine-version": "stable"}, files={"file": document_pdf(doc)}, data={"instructions": json.dumps({ "schema": schema, "parseConfig": {"mode": "understand"}, "options": {"strict": True, "includeCitations": True}, })}, timeout=300)["output"]
claim_out = extract(by_label["claim form"][0], CLAIM_FORM_SCHEMA)license_out = extract(by_label["driver's license"][0], LICENSE_SCHEMA)invoice_outs = [extract(d, INVOICE_SCHEMA) for d in by_label["repair invoice"]]# keep the *_out objects: output.metadata holds the citations for your audit trail.claim, license_ = claim_out["data"], license_out["data"]invoices = [o["data"] for o in invoice_outs]Some checks are arithmetic, and code does them best. The invoices should add up to the amount claimed, carry the same policy number, and be dated after the incident:
from datetime import date
rule_failures = []
totals = [i.get("total") for i in invoices]if None in totals or claim.get("amount_claimed") is None: rule_failures.append("An invoice total or the amount claimed couldn't be read")elif abs(sum(totals) - claim["amount_claimed"]) > 0.01: rule_failures.append("Invoice totals don't match the amount claimed")
if any(i.get("policy_number") not in (None, claim.get("policy_number")) for i in invoices): rule_failures.append("Policy number differs between documents")
dates = [i.get("invoice_date") for i in invoices]if claim.get("incident_date") is None or None in dates: rule_failures.append("The incident date or an invoice date couldn't be read")elif any(date.fromisoformat(d) < date.fromisoformat(claim["incident_date"]) for d in dates): rule_failures.append("An invoice is dated before the incident")Other checks need judgment. “Jonathan Miller” and “Jon A. Miller” don’t match as strings, but they’re almost certainly the same person. And a text rule can’t tell you whether a photo shows front or rear damage.
For those, ask the Nutrient document decision model through the decision API in AI Gateway. Put the extracted fields in the state, add the photo pages as images, and ask one yes/no question per check:
GATEWAY_HEADERS = {"Authorization": f"Bearer {os.environ['NUTRIENT_AI_GATEWAY_KEY']}"} # needs AI Gateway scope.
def page_images(doc): images = [] for i in range(doc["startPage"] - 1, doc["endPage"]): for img in reader.pages[i].images: mime = mimetypes.guess_type(img.name)[0] or "image/jpeg" data = base64.b64encode(img.data).decode() images.append({"type": "image", "source": f"data:{mime};base64,{data}"}) return images
request = { "model": "nutrient-document-decision", "state": { "claim_form": { "claimant": claim["claimant_name"], "damage_description": claim["damage_description"], }, "license": {"name": license_["name"]}, "photos": [im for d in by_label["damage photo"] for im in page_images(d)], }, "questions": { "same_person": { "type": "noul", "instructions": ( "Do the claimant name on the claim form and the name on the license " "refer to the same person? Short forms and middle initials count as a match." ), }, "photos_match": { "type": "noul", "instructions": ( "Do the damage photos show damage consistent with the damage description " "on the claim form, including which part of the vehicle is damaged?" ), }, },}
if not request["state"]["photos"]: rule_failures.append("No images found on the damage photo pages")
answers = post("/ai/v1/systemone", headers=GATEWAY_HEADERS, json=request)["answers"]# answers["same_person"]["noul"] -> 0.96# answers["photos_match"]["noul"] -> 0.08Each noul value is the probability that the answer is yes. A score of 0.96 on same_person is a confident yes, so the name check passes. A score of 0.08 on photos_match is a firm no. The form says front; the photos show the rear.
We left the bank details out on purpose. The decision model doesn’t need them, so they aren’t sent to the decision step.
Route the claim: Straight-through or to a handler
A claim goes straight to an assessor only if every check passes. Otherwise, it goes to an intake handler with the reasons.
DECISION_THRESHOLD = 0.5 # probability of "yes"; tune separately from THRESHOLD.
def pages(d): s, e = d["startPage"], d["endPage"] return f"page {s}" if s == e else f"pages {s}-{e}"
def intake_reasons(documents, rule_failures, answers): reasons = [] for d in documents: if d["boundaryConfidence"] < THRESHOLD: reasons.append(f"Check where the document on {pages(d)} starts") if d["label_score"] < THRESHOLD: reasons.append(f"Confirm what the document on {pages(d)} is") reasons += rule_failures for name, answer in answers.items(): if answer.get("noul") is None or answer["noul"] < DECISION_THRESHOLD: reasons.append(f"Check failed: {name}") return reasons
reasons = intake_reasons(documents, rule_failures, answers)route = "intake handler" if reasons else "assessment"For our packet, the handler gets two reasons:
| Reason | Where to look | What the handler does |
|---|---|---|
| Check where the document on page 6 starts | Boundary score 0.81 | Confirms page 6 is a separate invoice from body shop B |
Check failed: photos_match | Photos on pages 7–9, damage description on page 1 | Calls the customer about front vs. rear damage |
Nobody had to open the file to clear the rest of the packet. The name check passed, even though a string comparison would have failed it.
Nothing here approves or denies a claim. The only output is a route: assessment or a handler.
Before you rely on it
Why not rules for everything? Rules are the right tool for arithmetic and dates, and you should keep them. Matching names takes a rule for every short form and spelling variant, though, and a text rule can’t look at a photo. Send those checks to the decision model as yes/no questions.
Test it on closed claims. One packet shows how the checks work, but it doesn’t show how well they work on your claims. Run 100 to 200 claims your team has already processed. For each check, count how many clean claims it flagged and how many problem claims it let through. Then adjust the thresholds until the claims that reach a handler are the ones that needed one.
Keep an audit trail. Store each value’s citation from output.metadata, every score, the question text, and the engine version with the claim. When someone asks why a claim was routed to a handler, you can show them. Retest after engine updates.
Data handling. Split, classify, and the decision checks run on the Nutrient document decision model, on Nutrient’s own servers, so those requests don’t go to an outside model provider. Claim packets hold IDs and bank details, so check your plan’s data terms before sending production claims: On some plans, Nutrient keeps a copy of run data to operate and improve its services, including model training. Only extract bank details into systems already approved for payment data.
Timing and scale. Time a few of your own packets while you test, since speed depends on page count and parse mode. In production, run the classify and extract calls concurrently, and retry with backoff when you hit rate limits.
Cost. Split costs $0.003 per page, and classify costs $0.001 per page, so sorting our 14-page packet costs $0.042 for split plus $0.014 for classify. Extraction in understand mode costs $0.015 per page, and we extract six pages (the two-page claim form, the license, and three invoice pages). That’s $0.054 for parsing in understand mode plus $0.036 for extraction. New accounts get $5 of free usage a month. The decision step runs through AI Gateway, priced by tokens on the same plan.
Try it on a real claim
Pick a claim packet your team found slow and run the split, classify, and extract steps on it today. Then add the decision checks with AI Gateway.
Get your free API key
The decision checks call the decision API in AI Gateway, which needs a key with AI Gateway access. AI Gateway comes with every new account and is paid from the same plan and monthly usage as Data Extraction. Sign up for AI Gateway(opens in a new tab).
FAQ
Split the claim packet into documents, label each one, check that the required documents are there, extract the key details, and cross-check them. Claims that pass go to assessment; the rest go to a handler with the reasons. The code in this post does each step.
A claim that passes every check moves to assessment without anyone touching it. You tune toward it: Start with conservative thresholds and loosen them as your closed-claim tests show which checks you can trust.
No. You describe your document types as labels and your checks as questions, in plain language.
Yes. Split, classify, and the decision checks run on the Nutrient document decision model, which reads the page image as well as the text. That’s how a photo of a dented bumper gets labeled and compared with the claim form.
On the Nutrient document decision model, on Nutrient’s own servers. Before sending production claims, check your plan’s data retention terms, as described under data handling above.
No. It only answers the questions you ask, and your code decides whether a handler reviews the claim before assessment. Assessment and payment decisions stay with your team.