| name | veryfi-documents-ai |
| description | Real-time OCR and data extraction API by Veryfi. Extract structured data from receipts, invoices, bank statements, W-9s, purchase orders, bills of lading, and any other document. Use when you need to OCR documents, extract fields, parse receipts/invoices, bank statements, classify documents, detect fraud, or simply convert documents to markdown. |
| metadata | {"openclaw":{"requires":{"env":["VERYFI_CLIENT_ID","VERYFI_USERNAME","VERYFI_API_KEY"]},"primaryEnv":"VERYFI_CLIENT_ID"}} |
Documents AI by Veryfi
Real-time OCR and data extraction API — extract structured data from receipts, invoices, bank statements, W-9s, purchase orders, and more, with document classification, fraud detection, and markdown conversion.
Get your API key: https://app.veryfi.com/api/settings/keys/
Quick Start
For Receipts and Invoices:
curl -X POST "https://api.veryfi.com/api/v8/partner/documents/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@invoice.pdf"
Response:
{
"id": 62047612,
"created_date": "2026-02-19",
"currency_code": "USD",
"date": "2026-02-18 14:22:00",
"document_type": "receipt",
"category": "Meals & Entertainment",
"is_duplicate": false,
"vendor": {
"name": "Starbucks",
"address": "123 Main St, San Francisco, CA 94105"
},
"line_items": [
{
"id": 1,
"order": 0,
"description": "Caffe Latte Grande",
"quantity": 1,
"price": 5.95,
"total": 5.95,
"type": "food"
}
],
"subtotal": 5.95,
"tax": 0.52,
"total": 6.47,
"payment": {
"type": "visa",
"card_number": "1234"
},
"img_url": "https://scdn.veryfi.com/documents/...",
"pdf_url": "https://scdn.veryfi.com/documents/..."
}
For Bank Statements:
curl -X POST "https://api.veryfi.com/api/v8/partner/bank-statements/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@bank-statement.pdf"
Response:
{
"id": 4820193,
"created_date": "2026-02-19T12:45:00.000000Z",
"bank_name": "Chase",
"bank_address": "270 Park Avenue, New York, NY 10017",
"account_holder_name": "Jane Doe",
"account_holder_address": "456 Oak Ave, San Francisco, CA 94110",
"account_number": "****7890",
"account_type": "Checking",
"routing_number": "021000021",
"currency_code": "USD",
"statement_date": "2026-01-31",
"period_start_date": "2026-01-01",
"period_end_date": "2026-01-31",
"beginning_balance": 12500.00
Setup
1. Get Your API Key
https://app.veryfi.com/api/settings/keys/
Save your API keys:
export VERYFI_CLIENT_ID="your_client_id_here"
export VERYFI_USERNAME="your_username_here"
export VERYFI_API_KEY="your_api_key_here"
2. OpenClaw Configuration (Optional)
Recommended: Use environment variables (most secure):
{
skills: {
entries: {
"veryfi-documents-ai": {
enabled: true,
// Keys loaded from environment variables:
// VERYFI_CLIENT_ID, VERYFI_USERNAME, VERYFI_API_KEY
},
},
},
}
Alternative: Store in config file (use with caution):
{
skills: {
entries: {
"veryfi-documents-ai": {
enabled: true,
env: {
VERYFI_CLIENT_ID: "your_client_id_here",
VERYFI_USERNAME: "your_username_here",
VERYFI_API_KEY: "your_api_key_here",
},
},
},
},
}
Security Note: If storing API keys in ~/.openclaw/openclaw.json:
- Set file permissions:
chmod 600 ~/.openclaw/openclaw.json
- Never commit this file to version control
- Prefer environment variables or your agent's secret store when possible
- Rotate keys regularly and limit API key permissions if supported
Common Tasks
Extract data from Passport
curl -X POST "https://api.veryfi.com/api/v8/partner/any-documents/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@passport.jpg" \
-F "blueprint_name=passport"
Extract data from Checks
curl -X POST "https://api.veryfi.com/api/v8/partner/checks/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@check.jpg"
Extract data from W-9s
curl -X POST "https://api.veryfi.com/api/v8/partner/w9s/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@w9.pdf"
Classify a Document
Identify the document type without full data extraction. Useful for routing documents to the correct processing endpoint, pre-filtering uploads, or bulk sorting.
curl -X POST "https://api.veryfi.com/api/v8/partner/classify/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@document.pdf"
Note: By default, the API classifies against 15 built-in types. You can also pass a document_types array with custom classes (see example below).
Response:
{
"id": 81023456,
"document_type": {
"score": 0.97,
"value": "invoice"
}
}
Default document types: receipt, invoice, purchase_order, bank_statement, check, w2, w8, w9, statement, contract, credit_note, remittance_advice, business_card, packing_slip, other.
To classify against custom types, pass a document_types array:
curl -X POST "https://api.veryfi.com/api/v8/partner/classify/" \
-H "Content-Type: multipart/form-data" \
-H "Client-Id: $VERYFI_CLIENT_ID" \
-H "Authorization: apikey $VERYFI_USERNAME:$VERYFI_API_KEY" \
-F "file=@document.pdf" \
-F 'document_types=["lease_agreement", "utility_bill", "pay_stub"]'
Advanced Features
Bounding Boxes for Receipts, Invoices, Checks and Bank Statements APIs
Get element coordinates for layout analysis:
-F "bounding_boxes=true"
-F "confidence_details=true"
When to Use
Use Veryfi Documents AI For:
- Invoice and receipt data extraction
- Processing Bank Statements
- Extracting data from Checks
- Document classification and routing
- Extracting data from any other document
Don't Use For:
- Video/audio transcription
Best Practices
| Document Type | Endpoint | Notes |
|---|
| Receipts & Invoices | /api/v8/partner/documents/ | use for receipts/invoices/purchase orders |
| Bank Statements | /api/v8/partner/bank-statements/ | use for Bank statements |
| Checks | /api/v8/partner/checks/ | use for bank checks (cheques in Canada) |
| W-9s | /api/v8/partner/w9s/ | W9 forms |
| Any Document | /api/v8/partner/any-documents/ | Use to extract data from any document list of blueprints provided below |
| Classify | /api/v8/partner/classify/ | Identify document type without full extraction |
List of available blueprints:
| blueprint_name | Document Type |
|---|
| passport | Passport US or International |
| incorporation_document | Certificate of Company Incorporation |
| us_driver_license | US Driver's License |
| uk_drivers_license | UK Driver's Licence |
| us_health_insurance_card | US Health Insurance Card |
| prescription_medication_label | Prescription Medication Label |
| medication_instructions | Medication Instructions |
| vision_prescription | Vision Prescription |
| auto_insurance_card | Auto Insurance Card |
| restaurant_menu | Restaurant Menu |
| drinks_menu | Drinks Menu |
| product_nutrition_facts | Product Nutrition Facts Label |
| goods_received_note | Goods Received Note |
| vendor_statement | Vendor Statement |
| flight_itinerary | Flight Itinerary |
| bill_of_lading | Bill of Lading |
| air_waybill | Air Waybill |
| freight_invoice | Freight Invoice |
| shipping_label | Shipping Label |
| vehicle_registration | Vehicle Registration |
| work_order | Work Order |
| settlement_letter | Settlement Letter |
| construction_estimate | Construction Estimate |
| diploma | Diploma or Degree Certificate |
| price_sheet | Price Sheet |
| mortgage_application_form | Mortgage Application Form |
| lab_test_request_form | Lab Test Request Form |
| construction_snapshot | Construction Snapshot |
| medical_prescription_list | Medical Prescription List |
| v5c | UK Vehicle Registration Certificate (V5C) |
| bank_account_verification_letter | Bank Account Verification Letter |
| annual_mortgage_statement |
Missing document type?
If document type (blueprint) you need to extract data from is missing, create one here:
https://app.veryfi.com/inboxes/anydocs?tab=blueprints
Bounding Boxes & Confidence:
- Add
-F "bounding_boxes=true" for element coordinates
- Add
-F "confidence_details=true" for per-field confidence scores
Supported Inputs:
file — multipart file upload
file_url — publicly accessible URL
file_data — base64-encoded content
Response Schemas
Receipt / Invoice (/api/v8/partner/documents/)
{
"id": 62047612,
"created_date": "2026-02-19T00:00:00.000000Z",
"updated_date": "2026-02-19T00:00:05.000000Z",
"currency_code": "USD",
"date": "2026-02-18 14:22:00",
"due_date": "2026-03-18",
"document_type": "receipt",
"category": "Meals & Entertainment",
"is_duplicate": false,
"is_document": true,
"invoice_number": "INV-2026-001",
"account_number": "ACCT-12345",
"order_date": "2026-02-18",
"delivery_date":
Check (/api/v8/partner/checks/)
{
"id": 9301847,
"created_date": "2026-02-19T00:00:00.000000Z",
"updated_date": "2026-02-19T00:00:03.000000Z",
"amount": 1500.00,
"amount_text": "One Thousand Five Hundred and 00/100",
"check_number": "4021",
"date": "2026-02-15",
"currency_code": "USD",
"check_type": "personal_check",
"payer_name": "John Smith",
"payer_address": "789 Elm St, Austin, TX 78701",
"receiver_name": "Acme Plumbing LLC",
"receiver_address": null,
"bank_name":
Bank Statement (/api/v8/partner/bank-statements/)
{
"id": 4820193,
"created_date": "2026-02-19T12:45:00.000000Z",
"updated_date": "2026-02-19T12:45:10.000000Z",
"bank_name": "Chase",
"bank_address": "270 Park Avenue, New York, NY 10017",
"account_holder_name": "Jane Doe",
"account_holder_address": "456 Oak Ave, San Francisco, CA 94110",
"account_number": "****7890",
"account_type": "Checking",
"routing_number": "021000021",
"currency_code": "USD",
"statement_date": "2026-01-31",
"period_start_date": "2026-01-01",
"period_end_date":
Security & Privacy
Data Handling
Important: Documents uploaded to Veryfi are transmitted to https://api.veryfi.com and processed on AWS servers.
Before uploading sensitive documents:
Best practices:
- Do not upload highly sensitive PII (SSNs, medical records, financial account numbers) until you've confirmed the service's security and compliance posture
- Use API keys with limited permissions/scopes if available
- Monitor API usage logs for unauthorized access
- Never log or commit API keys to repositories or examples
File Size Limits
- Max file size: 20 MB per document
- Number of pages: default is <=15 pages for receipts/invoices, <=50 pages for bank statements. Contact support to increase limits.
Operational Safeguards
- Always use environment variables or secure secret stores for API keys
- Never include real API keys in code examples or documentation
- Use placeholder values like
"your_api_key_here" in examples
- Set appropriate file permissions on configuration files (600 for JSON configs)
- Enable API key rotation and monitor usage through the dashboard
Troubleshooting
400 Bad Request:
- Provide exactly one input:
file, file_url, or file_data (for base64)
- Verify Username, API Key and Client ID are valid
- Check the
message field in the JSON response for the specific error detail
Missing Confidence Scores:
- Add
confidence_details=true to the request to include score and ocr_score fields in the response
- Add
bounding_boxes=true to also get bounding_box and bounding_region coordinates
Tips
- Store
VERYFI_CLIENT_ID, VERYFI_USERNAME, and VERYFI_API_KEY in environment variables rather than hardcoding them
- Use
confidence_details=true and bounding_boxes=true when you need per-field accuracy scores or element coordinates
- For large volumes, classify documents first with
/classify/ and route to the appropriate extraction endpoint
- Keep file sizes under 20 MB and stay within page limits (15 for invoices, 50 for bank statements)
- Test with sample documents before processing sensitive data in production
- If a blueprint you need is missing, create a custom one at
https://app.veryfi.com/inboxes/anydocs?tab=blueprints
References