Document Forensics API

Advanced fraud detection, OCR address extraction, and transaction classification powered by machine learning

View Documentation Try API

Features

OCR Address Extraction

Extract structured address and name data from documents with 95%+ accuracy.

Hybrid Fraud Detection

Combines rule-based critical checks with ML scoring and TruFor deep learning for comprehensive document forensics.

Transaction Classification

Automatically categorize bank transactions using ML with 83.73% accuracy across 16 transaction types and 63 categories.

15+ Detection Features

Analyzes metadata, visual artifacts, DPI mismatches, font anomalies, photo fraud, and Benford's Law patterns.

Visual Heatmaps

Generates ELA heatmaps and forgery localization maps highlighting tampered regions in documents.

Enterprise Ready

API key authentication and PostgreSQL audit logging.

Quick Start

1. Get Your API Key

Contact your administrator to obtain a FORENSICS_API_KEY for authentication.

2. Make Your First Request

import requests

url = "https://your-api-domain.com/api/ocr/address"
headers = {"X-API-Key": "your_api_key_here"}

with open("document.pdf", "rb") as f:
    files = {"file": f}
    response = requests.post(url, headers=headers, files=files)
    
data = response.json()
print(f"Confidence: {data['confidence']}%")
print(f"Customer Name: {data['extractedData']['MatchResult']['CustomerDetails']['CustomerNames'][0]}")
print(f"Address: {data['extractedData']['MatchResult']['CustomerDetails']['CustomerAddress']}")
const formData = new FormData();
formData.append('file', fileInput.files[0]);

fetch('https://your-api-domain.com/api/ocr/address', {
    method: 'POST',
    headers: {
        'X-API-Key': 'your_api_key_here'
    },
    body: formData
})
.then(response => response.json())
.then(data => {
    console.log(`Confidence: ${data.confidence}%`);
    console.log('Extracted Data:', data.extractedData);
})
.catch(error => console.error('Error:', error));
curl -X POST https://your-api-domain.com/api/ocr/address \
  -H "X-API-Key: your_api_key_here" \
  -F "file=@document.pdf"

📚 Available Endpoints

POST /api/ocr/address

Extract structured address and name data from documents (PDFs, images) with confidence scores.

Processing Time: ~12-15 seconds | Accuracy: 95%+

POST /api/forensics/analyze-hybrid

Comprehensive fraud detection combining rule-based checks, ML scoring, and TruFor deep learning analysis.

Processing Time: 2-3 seconds (GPU) | Features: 15+ detection methods

POST /api/transactions/classify

Classify bank transactions into categories using machine learning (TF-IDF + Logistic Regression).

Processing Time: ~6ms (3 transactions) | Accuracy: 83.73% (type), 56.19% (category)