Skip to main content

ADocs Universal Document Processing API

You define what to extract - AnyDocs handles the rest

Updated yesterday

∀Docs (AnyDocs) Universal Document Processing API

∀Docs API Endpoint

GDPR | HIPAA | SOC 2 Type 2
38+ Languages | 91+ Currencies | Blueprint-Powered | Unlimited Capabilities

What is AnyDocs?

What is ∀Docs (AnyDocs) and how is it different from other Veryfi APIs?

∀Docs is Veryfi's universal document extraction API. While other Veryfi APIs (Receipts, Invoices, W-2, Checks, etc.) are purpose-built for specific document types, AnyDocs is designed to work with any document structure - from auto insurance cards and passports to articles of incorporation, restaurant menus, and medication prescriptions.

It uses a specialized in-house LLM fine-tuned on hundreds of millions of business documents, combined with a computer vision model that reads text, tables, logos, barcodes, checkboxes, and signatures across any layout. You define what to extract using a Blueprint; AnyDocs handles the rest.

What does “fine-tuned LLM + Vision Model” mean in practice?

Most LLMs (GPT, Gemini, etc.) are trained on general internet text and are not designed for document extraction. They tend to hallucinate, especially on structured data like tables and numbers.

Veryfi’s ∀Docs model was fine-tuned exclusively on business documents - not general text, which means it understands document context, layout, and field relationships. The vision component processes the actual image, allowing it to handle:

  • Printed and handwritten text

  • Tables with irregular column widths

  • Logos, stamps, and watermarks

  • Checkboxes and form fields

  • Barcodes and QR codes

  • Multi-column and complex layouts

The result is consistent, structured JSON output, extracted data always comes from the document itself, never fabricated.

Does AnyDocs require a separate plan or add-on?

AnyDocs is available on paid plans and included in the 14-day free trial. Because it uses a more capable model than the standard OCR APIs, it is billed separately from Receipts/Invoices processing. Check the pricing page or contact [email protected] for current AnyDocs-specific pricing.


How It All Works

Processing Flow

What is the end-to-end flow for processing a document with AnyDocs?

1

Create or select a Blueprint

A Blueprint defines the fields you want extracted. Use a pre-built Veryfi Blueprint (Passport, Driver’s License, etc.) or build your own in the Web Portal.

2

Submit the document

Send a POST request to /any-documents with your file (upload, file_url, or base64) and the blueprint_name parameter.

3

∀Docs processes the document

The LLM + Vision model reads the document, applies the Blueprint schema, and extracts the specified fields with contextual understanding.

4

Receive structured JSON

The API returns clean JSON with your defined fields, confidence scores, and optional bounding box data. Delivered synchronously or via webhook.

For more details, refer to Veryfi API Docs

Does AnyDocs support synchronous and asynchronous processing?

Yes. By default, AnyDocs processes documents synchronously and returns the JSON inline. For higher volumes or large PDFs, use asynchronous processing with webhooks:

  • Submit the document with a webhook URL configured in your account

  • Receive an immediate acknowledgement with a document ID

  • Veryfi POSTs the completed extraction result to your webhook endpoint

See the Webhooks and Asynchronous Processing article for full setup instructions.


What Can AnyDocs Process?

What document types are supported out of the box?

AnyDocs ships with pre-built Blueprints for the following document types. These are ready to use immediately with no configuration required:

🛂 Passport (US, India, LATAM)

🪪 Driver's License

🚗 Auto Insurance Card

🏥 Health Insurance Card

📦 Goods Received Note

🍽️ Restaurant Menu

🥦 Product Nutrition Facts

🏛️ Article of Incorporation

📋 Shipping Label

💊 Prescription Medication Label

🏢 Vendor Statement

🚘 V5C Vehicle Registration

📜 Certificate of Good Standing

🎓 Diploma / Degree Certificate

🍷 Wine Label / Beverage Menu

📄 Contract / Legal Document

📝 Work Order

🆔 Any ID Document

..and many more...

The complete, current list with field-level details is available in the Supported Blueprints article. New Blueprints are released regularly.

My document type is not in the list. Can I still use AnyDocs?

Yes, this is one of AnyDocs’ key use cases. You can create a custom Blueprint for any document type via the Web Portal.

The Blueprint builder is a no-code visual tool: upload a sample document, draw boxes around the fields you want, name them, and save. Your custom Blueprint is immediately available via the API.

How do I create a custom Blueprint?

Please follow the instructions provided in How to create Blueprint Article.

Here is how easy it is to create a Blueprint! Now, Veryfi AI will try to guess what fields you might need and suggest a JSON schema automatically.

✓ Quick start

Creating a Blueprint takes about 10 minutes. For high-volume, business-critical document types, a custom trained model will deliver higher accuracy over time.


Working with Blueprints

What is a Blueprint?

A Blueprint is a reusable extraction template that tells AnyDocs which fields to extract and where to find them on a document. Think of it as a form overlay that maps field names to regions of the document image.

Blueprints define:

  • Field names - the JSON keys in the response (e.g., policy_number, expiration_date)

  • Data types - string, number, date, boolean, array, object

  • Extraction regions - the document areas where each field lives

  • Groups -optional nesting to organize related fields (e.g., insured_person.name)


Making API Calls

How do I make a basic AnyDocs API request?

Use a POST request to the AnyDocs endpoint with your credentials and document. The blueprint_name parameter is strongly recommended.

# Python example

import requests

headers = {

'CLIENT-ID': '<YOUR_CLIENT_ID>',

'AUTHORIZATION': 'apikey <USERNAME>:<API_KEY>'

}

payload = {

'file_url': 'https://example.com/auto_insurance_card.jpg',

'blueprint_name': 'auto_insurance_card'

}

response = requests.post(

'https://api.veryfi.com/api/v8/partner/any-documents',

headers=headers,

json=payload

)

print(response.json())

You can also submit documents as a base64-encoded string or via file upload (multipart form data). See docs.veryfi.com for all input methods.

What does a typical AnyDocs JSON response look like?

The response schema mirrors your Blueprint’s field names and grouping. Example for a US Passport Blueprint:

{

"id": 12345678,

"blueprint_name": "us_passport",

"passport_number": "963545657",

"date_of_issue": "2017-04-14",

"expiration_date": "2027-04-14",

"place_of_issue": "United States Department of State",

"person": [{

"first_name": "JOHN",

"last_name": "SMITH",

"date_of_birth": "1985-09-23",

"place_of_birth": "CALIFORNIA, U.S.A",

"nationality": "UNITED STATES OF AMERICA"

}],

"confidence": 0.97,

"created_date": "2024-11-15T14:22:33Z"

}

All dates are returned in ISO-8601 format (YYYY-MM-DD). The confidence field reflects the model’s certainty for the overall extraction.

What file formats does AnyDocs accept?

  • Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .avif, .webp

  • Documents: .pdf (single and multi-page), .tiff

  • Archives: .zip (containing multiple image files)

For best accuracy, submit documents at 150 DPI or higher with clean, undistorted images.

Page limit

Multi-page PDFs are processed up to 15 pages by default. Use the max_pages_to_process parameter to control this limit.

From API Docs
Veryfi's Process a ∀Doc endpoint allows you to submit and extract data from unstructured documents such as Contracts, Articles of Incorporation and any other documents and turn them into valuable business insights. The Process a ∀Doc endpoint enables you to submit the following image formats: .pdf,.jpg,.jpeg,.png,.tiff,.tif,.bmp,.gif and retrieve extracted data in JSON format. The max file size is 20mb, min file size is 0.25kb. Rate limit is 60 requests per second.

Which SDKs support the AnyDocs endpoint?

All official Veryfi SDKs support AnyDocs: Python, Node.js, PHP, Java, C#, Go, Ruby, and Dart. SDK documentation and installation guides are in the SDKs section of the FAQ.

How do I specify which Blueprint to use in the API call?

Pass the Blueprint’s name as the blueprint_name parameter in the JSON body:

{

"file_url": "https://example.com/document.pdf",

"blueprint_name": "auto_insurance_card"

}

Blueprint names are the exact name you saved in the portal, lowercased with spaces replaced by underscores. Verify available Blueprint names in AnyDocs Inbox-> Blueprints in the Web Portal.


Accuracy and Performance

Quality and Speed

How accurate is AnyDocs? Can it hallucinate?

∀Docs is designed with a zero-hallucination architecture. Unlike general-purpose LLMs that can generate plausible-sounding text from their training data, ∀Docs only returns data explicitly present in the submitted document. If a field is not found, it returns null rather than guessing.

  • Fine-tuned on hundreds of millions of real business documents

  • Uses contextual understanding to resolve ambiguous fields

  • Includes per-response confidence scores so you can flag low-confidence extractions for human review

What factors affect AnyDocs extraction accuracy?

  • Image quality - blurry, skewed, or low-resolution images reduce accuracy.

  • Blueprint precision - neat instructions can improve results.

  • Document variability - if a document type has many different layouts, consider a separate Blueprint per variant.

  • Handwriting - AnyDocs handles print handwriting well; heavily stylized or cursive handwriting may reduce confidence scores.

  • Obscured content -watermarks, stamps, or redactions over key fields will affect extraction.

What is the typical API response time for AnyDocs?

∀Docs returns results in seconds for typical single-page documents. Response time varies based on document complexity and page count, number of Blueprint fields, server load and processing region, and file size and format.

For time-sensitive workflows, use Split Processing with Async Enrichment to get fast initial responses and enriched field data delivered later via webhook.

How do I improve accuracy for a Blueprint that is underperforming?

  1. Check input quality - verify the document image is sharp and properly oriented before submission.

  2. Refine the Blueprint -Play with fields descriptions anf promptig. Test the OCR preview in the Blueprint builder to confirm text capture.

  3. Split by layout variant - if you receive the same document type from multiple issuers with different layouts, create a separate Blueprint per variant.

  4. Use confidence scores - filter responses with confidence below a threshold (e.g., 0.85) for human review rather than automated processing.

  5. Contact support - email [email protected].


Fraud Suite

∀Docs support fraud suit

  • These are the valid fraud signals for ∀Docs:

    • LCD photo

    • screenshot

    • fraudulent pdf

    • not a document

    • generated document

    • ai generated

    • duplicate

    • digital tampering

    • multiple profiles or devices

Fraud Fields are off by default. Contact [email protected] to request access.

More about Fraud Suite


Automation

∀Docs and Business Rules

Automate post-processing logic on any extracted document field

What is the Business Rules Engine?

The Business Rules Engine (BRE) is a no-code automation layer that runs automatically after ∀Docs extracts data from a document. It lets you define conditional logic - IF [field] [condition] THEN [action] - to validate, transform, tag, or enrich extracted data without writing any code.

BR is the 2nd generation of Veryfi's Rules system. It replaces simple text-matching rules with a full condition engine supporting AND/OR logic, multiple operators, and a rich action library.

When does BRE run?

All Business Rules execute automatically during the post-processing stage, after ∀Docs has extracted data from the document. There is no manual trigger required once a rule is set up.

Common Use Cases

Identity & onboarding documents (Passport, Driver’s License)

  • Flag expired documents: expiration_date | before today | → tag 'expired'

  • Route by country of issue: place_of_issue | contains | 'United States' → tag 'domestic'

  • Trigger verification hold: confidence | less than | 0.85 → tag 'manual-review'

Insurance documents (Auto Insurance Card, Health Insurance Card)

  • Check policy validity: policy_effective_date and policy_expiration_date | bracket today → tag 'active'

  • Flag missing fields: policy_number | is empty → tag 'incomplete'

  • Categorize by insurer: insurance_company | contains | 'BlueCross' → assign category 'BCBS'

Legal & corporate documents (Article of Incorporation, Contract)

  • Route by state: state_of_incorporation | equals | 'Delaware' → tag 'DE-entity'

  • Alert on key dates: expiration_date | within 30 days | → notify team

  • Validate required fields: entity_name | is empty → tag 'needs-review'


∀Docs and Workflows

Build end-to-end document automation pipelines without code.

Veryfi Workflows is a visual, no-code automation tool that lets you build complete document processing pipelines by connecting nodes. A Workflow orchestrates everything from document ingestion to extraction to routing to output, without writing a single line of code.

∀Docs slots into Workflows as the Extract Data node. When your pipeline reaches that node, it sends the document to the AnyDocs API using the Blueprint you specify, then passes the resulting JSON downstream to Decision, Output, or other nodes.

Every Workflow is built from three types of nodes:

  • Input Triggers

  • Process Steps

  • Output Actions

i Workflows vs Business Rules

Business Rules act on data after extraction inside a single API call. Workflows orchestrate the entire process: where documents come from, how they’re extracted, what decisions are made, and where results go. Use both together for maximum automation.

Example Workflows

Pattern 1: Identity Verification Pipeline (Passport / Driver’s License)

1

API IMPORT

Upload via API

2

EXTRACT DATA

AnyDocs: us_passport

3

DECISION

confidence >= 0.90?

4a

EMAIL APPROVAL

If NO: flag for review

4b

GSHEETS

If YES: log verified

Use case: Financial institution onboarding. Customers upload passport photos through your app. AnyDocs extracts biographical data. Low-confidence results go to a human reviewer; high-confidence results are automatically logged and passed to your KYC system.

Pattern 2: Mixed Document Inbox (Auto-sort by Type then Extract)

1

GMAIL INPUT

Email attachments

2

CLASSIFIER

Detect doc type

3

DECISION

What type?

4

EXTRACT DATA

Route to Blueprint

5

GSHEETS

Log all results

Use case: Legal firm inbox. Clients email contracts, incorporation documents, and insurance cards in a single inbox. The Classifier node detects the document type; the Decision node routes each to the correct AnyDocs Blueprint (article_of_incorporation, auto_insurance_card, etc.). All results are logged to a shared Google Sheet.

✓ Classifier + AnyDocs tip

Use the Classify API as the Document Classifier node to detect document type first, then pass the detected type to a Decision node that selects the correct AnyDocs Blueprint. This eliminates the need to build separate workflows for each document type.

Pattern 3: Corporate Document Processing (Incorporation + Compliance)

1

GDRIVE IMPORT

Drop folder

2

EXTRACT DATA

AnyDocs: incorporation

3

DECISION

State = Delaware?

4

EMAIL FILE

Route to legal team

5

DROPBOX

Archive to Dropbox

Use case: M&A due diligence team. Target company documents are dropped into a shared Google Drive. AnyDocs extracts entity name, state of incorporation, registered agent, and key dates. A Decision node routes Delaware entities (most common for US corporations) to the legal team; all documents are archived to Dropbox.


∀Docs and Classify API

Detect document type first, then extract with the right Blueprint

What is the Classify API?

The Classification API (Vee) is a lightweight, fast API that identifies what type of document has been submitted. It returns a document_type label and a confidence score. It does not extract data — classification is its only job

Endpoint: POST https://api.veryfi.com/api/v8/partner/classify

Response: { "document_type": "passport", "confidence": 0.97 }

When combined with ∀Docs, the Classify API acts as a smart router: it determines the document type, and your code or Workflow then selects the correct AnyDocs Blueprint and calls the any-documents endpoint.

Document types can be custom as well, not limited to the list of provided ones. So regardless of the documents you want to work wth it should be able to distinguish those.

Why Use Classify Before AnyDocs?

By itself, ∀Docs requires you to specify a blueprint_name in every request. If your application receives mixed or unknown document types, you either have to ask the user what type of document they uploaded (bad UX) or build your own document detection logic (engineering overhead).

The Classify API solves this. Send the document to Classify first, get the type back in milliseconds, then route to the correct Blueprint automatically.

Without Classify

With Classify + ∀Docs

User must select document type manually

Fully automatic: Classify detects type, AnyDocs extracts

One blueprint_name hardcoded per flow

Dynamic Blueprint selection based on detected type

Mixed batches require pre-sorting

Submit mixed batches; Classify routes each document

Unknown documents fail or return wrong data

Unknown types flagged by confidence score before wasting extraction quota

More frontend complexity

Simpler UX: one upload input, no type selector needed


Data Privacy and Compliance

Is my document data shared with OpenAI or other third-party AI providers?

No. Veryfi runs ∀Docs on its own infrastructure. Your documents and extracted data never leave Veryfi’s data centers and are never sent to OpenAI, Google, or any other external AI provider. You own every piece of data you submit and every extraction result you receive.

🔒 Compliance certifications

Veryfi maintains GDPR, HIPAA, and SOC 2 Type 2 compliance with bank-level security protocols across all APIs, including AnyDocs.

Where is document data stored and for how long?

Data is stored in AWS US Oregon by default, with EU data residency available on request. Veryfi stores your documents and extracted JSON for as long as your account is active, in accordance with your Document Retention settings.

You can configure custom retention periods and delete documents at any time via the API or Web Portal. See the Document Retention Management article for details.

Is AnyDocs suitable for processing PII (passports, driver’s licenses, insurance cards)?

Yes. AnyDocs is designed and certified for PII-sensitive document processing. HIPAA compliance covers health-related documents (insurance cards, prescription labels). GDPR compliance covers EU identity documents. SOC 2 Type 2 audits all security controls annually.

For regulated industries (healthcare, finance, insurance), review the data storage documentation and contact [email protected] to discuss BAA (Business Associate Agreement) requirements.

Did this answer your question?