An AI document parsing API takes the PDFs, scans and Office files that finance teams receive (invoices, bank statements, receipts, contracts, management reports) and returns either clean text or structured JSON that software can use. You send the file, pick an operation and a model tier, and get back data plus a record of what it cost. This guide explains the three operations every finance workflow is built from (parse, ask and extract), which document types have dedicated endpoints, how tiers and per-page credits work, and a worked month-end example with real numbers.
Why finance documents are still keyed by hand
Most finance stacks are automated at both ends. Payment runs, bank feeds and dashboards work. The gap is in the middle, where data arrives as a document:
- Supplier invoices arrive as PDF attachments, each vendor with its own layout.
- Bank and card statements are downloaded as PDFs or arrive as scans from customers and borrowers.
- Remittance advice, expense receipts and settlement reports come as images, spreadsheets or multi-page exports.
Older approaches handled this badly. Template-based OCR reads text at fixed positions, so it breaks when a vendor moves a column or adds a logo, and every new layout needs a new template. Plain OCR turns an image into text but does not know which number is the total and which is a subtotal. RPA bots copy and paste on screen and stop working when a portal or a PDF changes.
An AI parsing API works differently. It reads the layout of each document (headings, tables, columns, page breaks) and uses a language model to map the content to what you asked for. A new vendor layout does not need a template; it needs the same request you already send.
What the API actually does: parse, ask, extract
PDF Vector exposes the same three operations for each document type. They answer different questions, and choosing the right one is most of the design work.
| Operation | You send | You get back | Typical finance use |
|---|---|---|---|
| Parse | The file | The whole document as Markdown (tables kept), plus pageCount, credits and requestId; HTML too on the max tier | Archiving a readable copy, feeding an LLM, building your own table parser, search |
| Ask | The file and a question | A short answer as Markdown | One-off lookups: "What are the payment terms?", "Is there a late fee?" |
| Extract | The file, a prompt and a JSON schema | data: JSON that matches your schema | Anything that feeds software: AP imports, reconciliation, analytics |
A simple rule: if code consumes the result, use extract. If a person or a language model reads it, use parse. Use ask for single questions where building a schema would be overkill.
Every operation accepts the file in exactly one of three ways: a public url, a multipart file upload, or a base64 string. Every response includes the credits charged and a requestId, and you can attach your own document ID (the x-pdfvector-document-id header or the SDK's context.documentId) so usage can be traced back to an invoice number or a message ID.
Endpoints for each finance document
Generic parsing works on any document, but invoices, bank statements and identity documents have dedicated endpoints tuned for their structure:
| Document | Endpoints | Notes |
|---|---|---|
| Any document (reports, contracts, receipts, spreadsheets) | Document Parse, Document Ask, Document Extract | Cheapest per page; all tiers for every operation |
| Invoices and receipts | Invoice Parse, Invoice Ask, Invoice Extract | Line items, totals, tax, multi-page tables |
| Bank and card statements | Bank Statement Parse, Bank Statement Ask, Bank Statement Extract | Transaction tables across many pages |
| Passports, licenses, ID cards | Identity Parse, Identity Ask, Identity Extract | KYC and onboarding |
The REST paths follow one pattern, POST https://global.pdfvector.com/api/<group>/<operation>, for example /api/document/parse, /api/invoice/extract or /api/bankStatement/extract. The TypeScript SDK mirrors it: client.document, client.invoice, client.bankStatement and client.identity, each with .parse, .ask and .extract.
Supported inputs include PDF, Word, Excel, PowerPoint (and the older DOC/XLS/PPT formats), CSV, plain text, HTML, RTF, OpenDocument files and EPUB on every tier. Scanned PDFs are read with OCR on mini and above (nano rejects them). Image files (PNG, JPG, TIFF, BMP, HEIF) need the pro, max or auto tier.
Model tiers and what they cost
Every request takes a model: auto (the default), nano, mini, pro or max. Higher tiers handle harder documents and cost more per page.
| Tier | Max file size | Max pages | Good for |
|---|---|---|---|
| nano | 40 MB | 30 | Clean, digital PDFs and Office files |
| mini | 40 MB | 30 | Digital documents with tables |
| pro | 40 MB | 30 | Scans, photos, dense tables |
| max | 500 MB | 2,000 | The hardest layouts, long documents, HTML output |
| auto | 500 MB | 2,000 | Lets PDF Vector pick per document |
Credits are charged per page:
| API | nano | mini | pro | max |
|---|---|---|---|---|
| Document Parse | 1 | 2 | 4 | 8 |
| Document Ask / Extract | 2 | 4 | 8 | 16 |
| Invoice / Bank Statement / Identity Parse | – | – | 6 | 10 |
| Invoice / Bank Statement / Identity Ask / Extract | 6 | 10 | 14 | 18 |
Three details matter for budgeting:
- Specialized parse is pro or max only. Invoice, bank statement and identity parse only run on
proandmax(orauto). Their ask and extract operations support all tiers. autobills the tier it ran, but at mostminiwhen the file is read without OCR (text PDFs, Office files, CSV and text). Scans and images bill the tier that actually ran.- Pages are counted by format. PDF and TIFF pages count as they are. Word, Excel, RTF, HTML, CSV and text count every 3,000 characters as one page. PowerPoint counts one page per slide, and each image is one page.
A request that ends in an error is never charged. Plans start with a free tier of 100 credits per month (no card), then Basic at $25/month for 3,000 credits and Pro at $97/month for 100,000 credits; see pricing for annual rates and Enterprise. Credits reset monthly and do not roll over.
A worked example: one month of documents
Take a small finance team with this monthly volume:
- 120 supplier invoices, two pages on average, extracted to JSON with Invoice Extract on
mini: 120 × 2 × 10 = 2,400 credits. - 6 bank statements of 4 pages each, extracted with Bank Statement Extract on
pro(some arrive as scans): 6 × 4 × 14 = 336 credits. - One 60-page annual report from a key customer, parsed to Markdown with Document Parse on
autoso an analyst can search it. It is a digital PDF read without OCR, soautobills at mostmini: 60 × 2 = 120 credits. (miniitself caps at 30 pages, which is whyautois the right choice for long files.)
Total: 2,400 + 336 + 120 = 2,856 credits, which fits inside Basic's 3,000. If the invoices needed pro because many were scans, the invoice line alone would be 120 × 2 × 14 = 3,360 credits, and the Pro plan would be the better fit.
Two cost traps to avoid:
- Asking many questions about a long document. Ask is billed per page of the document on every call. Ten questions about a 20-page contract on
minicost 10 × 20 × 4 = 800 credits. Parsing it once onminicosts 20 × 2 = 40 credits; after that you can search the Markdown yourself or pass it to your own model. - Using
maxby default. Start withautoor a lower tier, validate the output, and escalate only the documents that fail.
What the code looks like
Here is invoice extraction with the TypeScript SDK (npm install @pdfvector/client):
import { createClient } from "@pdfvector/client";
const client = createClient({ apiKey: process.env.PDFVECTOR_API_KEY });
const result = await client.invoice.extract(
{
url: "https://example.com/invoices/acme-1042.pdf",
prompt:
"Extract the vendor, invoice number, invoice date, currency, subtotal, tax, total and every line item. " +
"Dates as YYYY-MM-DD, amounts as plain numbers.",
schema: {
type: "object",
properties: {
vendorName: { type: "string" },
invoiceNumber: { type: "string" },
invoiceDate: { type: "string" },
currency: { type: "string" },
subtotal: { type: "number" },
tax: { type: "number" },
total: { type: "number" },
lineItems: {
type: "array",
items: {
type: "object",
properties: {
description: { type: "string" },
quantity: { type: "number" },
unitPrice: { type: "number" },
amount: { type: "number" },
},
},
},
},
required: ["vendorName", "invoiceNumber", "total"],
},
model: "mini",
},
{ context: { documentId: "acme-1042" } },
);
console.log(result.data, result.pageCount, result.credits);
And a quick question about a bank statement, in Python with requests (there is no Python SDK; the REST API is the same):
import requests
resp = requests.post(
"https://global.pdfvector.com/api/bankStatement/ask",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"url": "https://example.com/statements/march.pdf",
"question": "What is the closing balance, and are there any returned payment fees?",
"model": "mini",
},
timeout=300,
)
resp.raise_for_status()
print(resp.json()["markdown"])
For long documents or slow pipelines, every operation also accepts an optional callback: { url }. The API then returns 202 straight away and POSTs the result to your webhook when it is ready.
Trust: validation, not confidence scores
The API returns data, not a confidence score per field, so the control has to come from checks you run on the output. Finance documents make this easier than most, because they carry their own arithmetic:
- Invoices: line amounts add up to the subtotal; subtotal plus tax equals the total; quantity times unit price equals the line amount.
- Bank statements: opening balance plus credits minus debits equals the closing balance, and printed running balances match line by line.
- Cross-system checks: the vendor exists in your master data, the invoice number is not a duplicate, the PO matches.
A good pipeline runs these checks on every document, retries failures once on a higher tier (pro or max), and sends what still fails to a person with the reason attached. The guide to validating extracted invoice data has the full rule set and code, and the bank statement parsing guide covers balance checks.
Where the data goes next
Once extraction and validation work, the output usually goes to one of three places:
- Your AP or ERP system, through its API or an import file. Validated invoices post automatically; exceptions wait for review.
- A spreadsheet or no-code tool. PDF Vector has integrations for Zapier, Make and n8n, so a Gmail attachment can become a Google Sheets row without code. The invoice automation guide builds that flow step by step.
- A data warehouse for reporting, cash-flow analysis or audit. That needs table design, lineage columns and idempotent loading, which the companion guide on turning financial PDFs into analytics-ready data covers.
Limits to plan around
nano,miniandproaccept up to 30 pages and 40 MB per file;maxandautoup to 2,000 pages and 500 MB. Useautoormaxfor long reports.- Image sides must be between 50 and 10,000 pixels.
- Password-protected PDFs are rejected; remove the password first.
- The shared instance runs in the US. Enterprise customers can run a dedicated instance in the UK, EU, US, Japan, Australia or Asia Pacific, which matters if your data has to stay in a region.
- Files are not used for training.
Try it before you integrate
You can test the engine on your own documents without writing code. The free PDF to Markdown tool and the Bank Statement Converter use the same parser (5 files per day, up to 5 MB and 5 pages each), and the JSON Schema Editor helps you build an extraction schema visually. When the output looks right, create an API key at app.pdfvector.com; the free plan's 100 credits cover about 10 single-page invoice extractions on mini (10 × 10 = 100).
FAQ
What is an AI document parsing API?
It is a web API that reads documents such as PDFs, scans and Office files and returns their content as text or structured JSON. Unlike template OCR, it does not need a layout definition per vendor or bank.
What is the difference between parsing and extracting?
Parsing returns the whole document as Markdown. Extracting returns only the fields you define in a JSON Schema, as JSON. Use extract when software consumes the result.
Which tier should a finance team start with?
Start with auto, or mini for digital PDFs and scanned PDFs (nano does not accept scans). Validate the output and retry failures on max instead of paying for max on every document.
How much does it cost to extract data from an invoice?
Invoice Extract costs 6, 10, 14 or 18 credits per page on nano, mini, pro and max. A two-page invoice on mini costs 2 × 10 = 20 credits.
Does the API return confidence scores?
No. Use the arithmetic in the document (totals, balances) and checks against your own records to decide what posts automatically and what goes to review.
Can it read scanned or photographed documents?
Yes. Scanned PDFs work on mini and above (not nano); image files such as PNG, JPG and TIFF need pro, max or auto.



