LLM Tool-Use for KYC: Automating Document Analysis
Automate KYC document analysis by calling Didit Document AI with a field list. The model returns typed fields, a name match score and risk codes. $0.20 per document; a person still decides In Review cases.

Contents
In this guide
Jump to the part you need.
This guide fits teams that receive documents no fixed template covers: bank statements, payslips, tax forms, proof of funds. It shows how to put an LLM in front of Didit document tools so the model reads the file, checks it for manipulation, compares the name, and routes cases with a REVIEW action to a person. Document AI costs $0.20 per document. The caveat: Document AI reports coded risks, the actions you configure decide the status, and In Review cases stay with people.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Route | What it does | Price | Best for |
|---|---|---|---|
| Document AI step inside a workflow | Reads fields you define from a PDF or image inside a verification session, checks the file for manipulation, compares the name | $0.20 per document | Long-tail documents collected next to an ID check |
| Document AI API (standalone) | The same extraction server to server, with no session | $0.20 per document | Back-office batches of statements, payslips and invoices |
| ID Verification | Government ID read and authenticity check, with OCR, MRZ parsing and barcode decoding | $0.15 per check in a workflow, $0.20 via the direct upload API | Passports, ID cards, residence permits, licences |
| Didit MCP server | Exposes the Didit tools to Claude, ChatGPT, Cursor, VS Code and other MCP clients | Free server, checks billed at their list price | Analysts and agents working from an AI assistant |
Start free in the sandbox at business.didit.me, no sales call. Developers who want an assistant to place the same calls should follow the setup at Didit MCP. Every unit price behind this page is on the pricing page, and the call itself is documented in the Document AI API reference.
Add Didit to Claude · Open Didit in ChatGPT · MCP setup for every client
The outcome, and the method we recommend
The outcome is a stack of documents that arrives as typed data. Every statement is read into the keys you defined, every file is checked for manipulation, the name on the document is compared with the name you expected, and anything unclear lands in a review queue carrying a warning code a person can act on. You do not write a parser per bank format.
We recommend three layers, and the LLM only owns the top one.
- Extraction and authenticity are deterministic. Didit Document AI runs its default extraction model over the file, types every field, decodes supported QR codes and barcodes, and runs a manipulation check. The verdict comes back as codes, not as prose, so it can be audited later. The behaviour is described in the Document AI overview.
- Policy is configuration. Each risk maps to an action you set per request:
DECLINE,REVIEWorNO_ACTION. The strictest triggered action decides the status. - The LLM orchestrates and explains. It chooses which tool to call, in which order, and writes the reviewer-facing summary. It does not decide the risk: the codes do, and they stay next to whatever the model wrote.
Didit serves 4,000+ companies across 220+ countries. The platform returns results in under two seconds at p99, which matters here because a document read sits inside an onboarding flow.
Prerequisites
- A Didit account with an application and its API key. The sandbox is free on every plan.
- A test document: a PDF or an image. For ID Verification the accepted extensions are tiff, jpg, jpeg, png, webp and pdf, at 5 MB per file, uncropped with all four corners visible.
- A field list of 1 to 30 items, written before the code.
- The expected name, if you want the name check to run. Send either the person's first and last name or the company name, not both.
- An LLM client that can call tools, or any MCP client, if you want the agent route.
- A place for In Review items: your own queue, or the review queue in the Didit Business Console.
Steps to automate document analysis with LLM tool-use

- Create the key and pick the route. Sign in to the Business Console, create an application and copy its API key. Use the sandbox application for the first run. Two routes read a document: a Document AI step inside a workflow, which is what you want when the same person is also doing an ID check, and the standalone Document AI API, which is what you want for a batch of statements already sitting in storage.
- Write the field definitions before any code. A call takes 1 to 30 definitions. Each has a
key(lowercase letters, digits and underscores, unique in the request), aname, aninstructionthat tells the model what to look for, atypeoftext,numberordate, and the flagsrequiredandis_full_name. Mark at most one fieldis_full_name, because that is the field the name check compares. Write the instruction as you would brief a new analyst, including what to leave out, for example "as a number, without the currency symbol". - Decide what happens to a bad document first. Each risk has an action set per request:
DECLINE,REVIEWorNO_ACTION. The strictest triggered action decidesdocument_ai.status, in the order Declined, then In Review, then Approved. Suspected manipulation defaults toDECLINE. A name mismatch defaults toNO_ACTION, so if you want a human to see name mismatches you must change that action yourself. - Send the file with the field definitions. The request is
multipart/form-data: the file indocumentand the whole field array infieldsas one JSON string. Register this endpoint once and reuse it, so the field list has a single owner in your integration.
Sendingcurl -X POST https://verification.didit.me/v3/document-ai/ \ -H "x-api-key: $DIDIT_API_KEY" \ -F "document=@./bank-statement.pdf" \ -F 'fields=[{"key":"account_holder","name":"Account holder","instruction":"Full name of the account holder","type":"text","required":true,"is_full_name":true},{"key":"balance","name":"Closing balance","instruction":"Closing balance as a number without the currency symbol","type":"number","required":true},{"key":"currency","name":"Currency","instruction":"Three-letter currency code of the balance","type":"text"}]' \ -F "expected_first_name=Jordan" \ -F "expected_last_name=Example"fieldsas bracket-style form keys, or as anything other than a JSON array, returns 400 before extraction runs, so nothing is billed. - Read the typed result, not the text.
extracted_datacomes back keyed by yourkeyvalues, with null for anything the model could not find, and dates arrive asYYYY-MM-DD.name_match_scoreis 0 to 100 when you sent an expected name and the document carries one, otherwise null.document_ai.detected_codeslists every QR code and barcode decoded per page.document_ai.warningslists the risk codes. - Branch on the status, not on the prose. Three outcomes: Approved, In Review, Declined. Treat In Review as a queue item for a person, never as an approval. If you want the LLM to write a summary for the reviewer, feed it the warnings array and the extracted fields, and store that summary beside the codes so anyone can check it.
- Wire the result into your own record. Inside a session, listen for the
session.status.updatedwebhook, or fetchGET /v3/session/{session_id}/decision/after the flow finishes. The decision response carries document results indocument_ai_documentsand identity results inid_verifications, so branch onsession_kindfirst:userfor KYC,businessfor KYB. - Add the agent route only if you want it. The Didit MCP server gives a signed-in assistant the same tools over OAuth, with no API key in its configuration. Otherwise the two calls above are enough.
What the agent sees over MCP
The hosted server at https://mcp.didit.me/mcp exposes 233 tools to a signed-in user: 113 read, 85 write and 35 destructive. Every client asks you to review tool calls before they run, so keep that on for write and destructive actions, because the server is read and write: an agent can create sessions, configure workflows and add entries to your lists on your behalf. The tools return the verbatim JSON of the underlying endpoints, so a reviewer sees the same fields the API would return.

Expected output
Illustrative response shape with synthetic values. The applicant, the balance and the score below are fictional. The field names and the structure are the documented ones for the call in step 4. The null on currency is the important line: a field the model cannot find comes back as null rather than as a guess.
{
"fields": [
{"key": "account_holder", "name": "Account holder", "type": "text", "required": true, "is_full_name": true},
{"key": "balance", "name": "Closing balance", "type": "number", "required": true},
{"key": "currency", "name": "Currency", "type": "text"}
],
"extracted_data": {
"account_holder": "Jordan Example",
"balance": 12345.67,
"currency": null
},
"name_on_document": "Jordan Example",
"name_match_score": 92,
"document_ai": {
"status": "Approved",
"warnings": [],
"detected_codes": [
{"type": "QR_CODE", "page_number": 1, "parsed_payload": "EXAMPLE-PAYLOAD"}
]
}
}

Inputs and outputs
| Input | Type | Required | What it does |
|---|---|---|---|
document | PDF or image, multipart file | Yes | The file to read. One file per call. |
fields | JSON array of 1 to 30 items, sent as one string | Yes | What to extract. Bracket-style keys return 400. |
key | Lowercase letters, digits, underscores | Yes, per field | Name of the output key, unique in the request. |
name, instruction, type | Strings, type is text, number or date | No, type defaults to text | The instruction is what the model acts on. Write it precisely. |
required | Boolean | No | A required field that is not found triggers the missing-fields risk. |
is_full_name | Boolean, at most one field | No | Chooses the value used for the name comparison. |
expected_first_name, expected_last_name | Strings | No | Compares a person's name. Do not send these with the company group. |
expected_company_name, expected_company_country | Strings, country as a 2-letter ISO code | No | Compares a company name instead of a person. |
| Output | Format | How to read it |
|---|---|---|
extracted_data | Object keyed by your key values | Null where the model found nothing. Never a placeholder. |
fields | Array | The normalized field definitions the response was built from. |
name_match_score | 0 to 100, or null | Below document_ai_name_match_score_threshold (default 80) raises DOCUMENT_AI_NAME_MISMATCH. Null when no expected name was sent or no name was found. |
name_on_document | String or null | The value the score was computed against. |
document_ai.detected_codes | Array of code objects | Per code: type, page number, position and bounding box, page dimensions, parsed payload, raw payload. Empty when no supported code was found. |
document_ai.warnings | Array of risk codes | Every risk that triggered, whatever its action. |
document_ai.status | Approved, In Review or Declined | The strictest triggered action decides it. |
Failure cases and recovery
| Symptom | Cause | Recovery |
|---|---|---|
| 400 before extraction | fields sent as bracket form keys, or as anything other than a JSON array | Resend as one JSON string. Nothing was billed. |
DOCUMENT_AI_UNREADABLE_DOCUMENT, default REVIEW | The scan is too poor to read | Ask for a fresh upload with the whole page in frame, and keep the case in review until one arrives. |
DOCUMENT_AI_MISSING_REQUIRED_FIELDS, default REVIEW | A field marked required was not found | Request a different document type, or have a reviewer read the file. |
DOCUMENT_AI_SUSPECTED_MANIPULATION, default DECLINE | The manipulation check triggered | Do not accept the file. Escalate to your fraud process rather than retrying. |
DOCUMENT_AI_NAME_MISMATCH, default NO_ACTION | Score below the threshold, default 80 | Set the action to REVIEW if your policy needs a person on every mismatch. |
DOCUMENT_AI_UNSUPPORTED_FILE, default REVIEW | File type outside the accepted set | Convert on your side, or reject with a clear message. |
| 403 on an ID Verification call | Insufficient credit balance | Top up or move the key to a plan with credit. The error text says so. |
| 401, 403 or 404 on a decision fetch | Invalid key, a key without read:sessions, or a session that belongs to another application | Check the key scope and the session id. The session is resolved as a user session first, then as a business session. |
| Status stuck at In Review | A review-level action triggered | Route it to a person. Do not auto-approve on a timer. |
Paid steps and review boundaries
What bills, at list price: Document AI at $0.20 per document, ID document only at $0.15 per check inside a workflow and $0.20 through the direct upload API, a full KYC check at $0.33, AML screening at $0.20, proof of address at $0.20. The MCP server and the workflow orchestrator are free to use, and the checks an agent calls are billed at the same list prices as any other call. A malformed Document AI request is rejected before extraction, so it is not billed.
Plan rules: the Free plan carries $10 of credit a month for eligible organizations and a free sandbox, Growth is $99 a month with $115 of credit and 4% off every Didit price, Scale is $299 a month with $350 of credit and 10% off. Credit is added monthly and does not roll over.

In Review requires manual handling under your policy. An Approved, In Review or Declined status from a document is an input to your policy, not a legal conclusion. A DECLINE action is a rule you configured, so you own the reasoning behind it and you should be able to show it to an auditor. When an agent runs the flow over MCP, keep the tool-call confirmation on for write and destructive tools, and read the returned JSON yourself rather than trusting the model's summary alone. Set an owner for manual decisions according to your internal policy.
Worked cost example
A lender onboards 5,000 applicants a month. Each applicant submits one government ID and one bank statement, and policy requires AML screening. At list prices:
- Full KYC check: 5,000 × $0.33 = $1,650.00
- Document AI on each bank statement: 5,000 × $0.20 = $1,000.00
- AML screening: 5,000 × $0.20 = $1,000.00
- Total: $1,650.00 + $1,000.00 + $1,000.00 = $3,650.00 a month, which is $0.73 per applicant (3,650 / 5,000 = 0.73)
On Scale, with 10% off every Didit price: $0.297 + $0.18 + $0.18 = $0.657 per applicant, and 5,000 × $0.657 = $3,285.00 a month. The Scale plan fee is $299 a month against $350 of monthly credit, so run your own volume through the calculator on the pricing page. On the Free plan, $10 of monthly credit covers about 13 of the same applicants (10 / 0.73 = 13.7).
AI vs offshore KYC document review
Teams comparing an automated read with an offshore review desk are comparing a fixed price per document with a shifting cost per reviewed file. We can publish our side: Document AI at $0.20 per document, ID document only at $0.15 inside a workflow, a full KYC check at $0.33. We cannot quote your review desk's cost, so the comparison has to use your numbers: take your loaded cost per reviewed document and compare it with $0.20 plus the share of files that still need a person.
What the automated read does better: it applies the same instructions to every file, it returns typed fields instead of typed notes, and it applies the documented manipulation check and returns the resulting warning codes. What a review desk still does better: judgment on a file the model could not read, context from a conversation with the customer, and decisions that need a policy call. The split that works is to automate the read and the tamper check on every document, and keep people for the In Review pile and for the policies that name a reviewer.
The automated route fails in one concrete way: a document quietly becomes an approval because nobody set the review action. Set the actions in step 3, and that failure is closed.
Sources
- Didit docs: Document AI API, read November 26, 2026.
- Didit docs: Document AI overview, read November 26, 2026.
- Didit docs: Document AI rules and warnings, read November 26, 2026.
- Didit docs: ID Verification API, read November 26, 2026.
- Didit docs: Create Session API, read November 26, 2026.
- Didit docs: Retrieve Session API, read November 26, 2026.
- Didit docs: Webhooks, read November 26, 2026.
- Didit docs: MCP server overview and MCP tools reference, read November 26, 2026.
- Didit pricing page and pricing in the docs, prices checked against the live feed on November 26, 2026.
- Didit MCP setup for every client and the integration prompt, read November 26, 2026.
Next step: open business.didit.me, start a free sandbox application, and run the call in step 4 against one of your own statements. No sales call is needed to get a result.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What is LLM tool-use in KYC document analysis?
It means an LLM chooses and calls external tools, such as an extraction API or an identity check, instead of only writing text. In a KYC flow the model reads the returned JSON and decides the next call, while the extraction and the tampering verdict come from Didit and come back as codes. That split keeps the model useful and the result auditable.
Can Claude or ChatGPT run Didit document checks directly?
Yes, through the Didit MCP server at https://mcp.didit.me/mcp. On Claude for web you add the connector and sign in with Didit over OAuth, and in ChatGPT you install the Didit plugin or add the server yourself. The server is read and write, so keep the client's tool-call confirmation on for write and destructive tools.
How much does automated document analysis cost per document?
Didit Document AI lists at $0.20 per document, whether you run it as a step in a workflow or through the standalone API. A full KYC check on the same person is $0.33 and ID document only is $0.15 inside a workflow. Prices are per completed check, paid from prepaid credit.
What happens when the model cannot read a document?
The response carries DOCUMENT_AI_UNREADABLE_DOCUMENT in document_ai.warnings, and the default action moves the status to In Review. A field the model cannot find comes back as null rather than as a guess, and a required field that is missing raises DOCUMENT_AI_MISSING_REQUIRED_FIELDS. You then ask for a fresh upload or send the case to a reviewer.
Does the LLM approve or decline the applicant?
No. The document status is set by the strictest triggered action you configured, and In Review always means a person decides. A model summary can sit beside the warning codes for the reviewer, but the codes and the configured actions are the record. Your organization owns the final decision and the audit trail behind it.
Which document types does Didit read?
Document AI is built for documents that do not fit a fixed template: proof of funds, payslips, bank statements, tax documents and invoices. For government IDs, Didit ID Verification covers 14,000+ document types in 220+ countries, with OCR, MRZ parsing and barcode decoding. Both routes accept a PDF or an image.
Is AI document verification cheaper than an offshore review team?
You have to run the number with your own labor cost, because we only publish our side. Didit charges $0.20 per document for Document AI and $0.33 for a full KYC check at list price. Compare that with your loaded cost per reviewed file, plus the share of documents that will still need a person under either route.
What fields can I extract from a bank statement?
Anywhere from 1 to 30 fields per call, and you define them in plain instructions. A typical set is account holder marked as the full name, closing balance as a number, currency as text and statement date as a date, which returns as YYYY-MM-DD. Mark one field is_full_name so the name on the document is compared with the name you expect.
How do I get the result into my own system?
Inside a session, subscribe to the session.status.updated webhook or call GET /v3/session/{session_id}/decision/ with your API key. Document results arrive in document_ai_documents and identity results in id_verifications. Branch on session_kind first, because it is user for KYC and business for KYB.
Can I test this without paying?
Yes. The sandbox is free and unlimited on every plan, and the Free plan adds $10 of credit a month for eligible organizations. A malformed request is rejected before extraction and is not billed. You can also reproduce outcomes with sandbox scenarios instead of uploading real documents.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


