Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.deepxl.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Fraud Detection API uses forensic AI to detect manipulated, altered, and AI-generated documents and images in real time.

Available Models

ModelUse CaseSupported File Types
documentDetects AI-generated or altered documents and IDs (bank statements, invoices, passports, driver licenses)jpg, jpeg, png, webp, pdf
objectDetects AI-generated or manipulated images (photos, claim evidence, receipts)jpg, jpeg, png, webp
Retrieve the full list of models programmatically:
curl https://api.deepxl.ai/v1/detection-models \
  -H "x-api-key: YOUR_API_KEY"

Supported Document Types

The document model classifies uploaded files into 71 types via the DOCUMENT_CLASSIFIER check, organized into 8 categories:

Identity (11 types)

TypeDescription
driver_licenseDriver license
national_idNational identification card
municipal_idMunicipal / local government ID
passportPassport book
passport_cardPassport card (wallet-sized)
residence_cardResidence permit card
work_authorizationWork authorization / permit
military_idMilitary identification
professional_idProfessional license / ID
voter_registration_cardVoter registration card
social_security_cardSocial Security card

Financial (19 types)

TypeDescription
bank_statementBank account statement
business_bank_statementBusiness bank account statement
checkIndividual check
list_of_checks_cashedList of checks cashed
check_registerCheck register
investment_statementInvestment / brokerage statement
retirement_account_statementRetirement account statement
pension_statementPension statement
annuity_award_letterAnnuity award letter
social_security_statementSocial Security statement
social_security_cola_noticeSocial Security COLA notice
disability_income_verificationDisability income verification
credit_card_statementCredit card statement
mortgage_statementMortgage statement
auto_loan_statementAuto loan statement
student_loan_statementStudent loan statement
personal_loan_statementPersonal loan statement
heloc_statementHome Equity Line of Credit statement
loan_statementLoan statement (generic)

Tax (9 types)

TypeDescription
form_1040IRS Form 1040 (personal tax return)
form_1120IRS Form 1120 (C-Corporation)
form_1120sIRS Form 1120S (S-Corporation)
form_1065IRS Form 1065 (Partnership)
w2_formW-2 wage and tax statement
form_10991099 tax form
schedule_cIRS Schedule C (business income)
schedule_eIRS Schedule E (rental income)
tax_returnTax return (generic)

Employment (7 types)

TypeDescription
pay_stubPay stub / earnings statement
employment_verification_letterEmployment verification letter
direct_deposit_verificationDirect deposit verification
unemployment_benefits_documentUnemployment benefits document
military_lesMilitary Leave and Earnings Statement
offer_letterOffer letter
self_employment_ledgerSelf-employment ledger

Property (6 types)

TypeDescription
property_deedProperty deed
property_tax_receiptProperty tax receipt
hoa_dues_statementHOA / condo dues statement
lease_agreementLease agreement
rental_receiptRental receipt
title_insurance_policyTitle insurance policy

Insurance (6 types)

TypeDescription
homeowners_insurance_declarations_pageHomeowners insurance declarations page
homeowners_insurance_binderHomeowners insurance binder
flood_insurance_declarations_pageFlood insurance declarations page
auto_insurance_declarations_pageAuto insurance declarations page
insurance_cardInsurance card
insurance_documentInsurance policy document

Commercial (6 types)

TypeDescription
business_licenseBusiness license
articles_of_incorporationArticles of incorporation
profit_and_loss_statementProfit and loss statement
utility_billUtility bill (electric, water, gas, etc.)
phone_billPhone bill
petty_cash_receiptPetty cash receipt
TypeDescription
government_letterGovernment letter (IRS, DMV, SSA, etc.)
vehicle_registrationVehicle registration
vehicle_titleVehicle title
court_orderCourt order
power_of_attorneyPower of attorney
death_certificateDeath certificate
marriage_certificateMarriage certificate
Files that do not match a known type are classified as other.

Analyzing a File

Submit a file for fraud detection via POST /v1/detection:
curl -X POST https://api.deepxl.ai/v1/detection \
  -H "x-api-key: YOUR_API_KEY" \
  -F "model=document" \
  -F "file=@invoice.pdf" \
  -F 'tags={"customerId":"9999","customerName":"Acme Corp","documentId":"INV-001","companyName":"DeepXL","companyId":"COMP-001"}'

Parameters

ParameterTypeRequiredDescription
modelstringYesdocument or object
filefileYesThe file to analyze (max 50 MB)
tagsstringNoJSON object with metadata key-value pairs
countrystringNoOptional country hint. Supported values: us, mx, br. Missing, empty, or invalid values default to us.
The maximum file size is 50 MB. Files exceeding this limit will be rejected with a 413 error.

Country Hint Behavior

Use the optional country parameter when you want the API to route or annotate the request with an explicit market hint.
  • Supported values: us, mx, br
  • Matching is case-insensitive
  • Leading and trailing whitespace is ignored
  • Missing, empty, or invalid values fall back to us
This is a request hint, not a detected issuer-country claim. The service stores the normalized value in metadata and returns it in the response when available. Example:
curl -X POST https://api.deepxl.ai/v1/detection \
  -H "x-api-key: YOUR_API_KEY" \
  -F "model=document" \
  -F "file=@invoice.pdf" \
  -F "country=mx" \
  -F 'tags={"customerId":"9999","customerName":"Acme Corp","documentId":"INV-001","companyName":"DeepXL","companyId":"COMP-001"}'

Response Structure

A detection response contains the following fields:
{
  "result": {
    "detectionId": 42,
    "mediaType": "document",
    "fileType": "pdf",
    "fileName": "bank_statement.pdf",
    "fileSize": 245678,
    "timestamp": 1725795600,
    "timestampISO": "2024-09-08T10:00:00.000000",
    "model": "document",
    "modelVersion": "1.1.0",
    "likelihood": 85.2,
    "fraudSeverity": "high",
    "classification": "verified",
    "reasoning": [
      "Potential manipulation detected in text region",
      "Font inconsistencies found"
    ],
    "modelResults": {
      "technicalChecks": [
        {
          "type": "DOCUMENT_CLASSIFIER",
          "status": "PASS",
          "details": "Classified as bank statement",
          "likelihood": 0.02
        },
        {
          "type": "SEMANTIC_FRAUD",
          "status": "FAIL",
          "details": "Detected inconsistencies in text formatting",
          "likelihood": 0.85
        }
      ]
    },
    "tags": [
      { "name": "customerId", "value": "9999" },
      { "name": "customerName", "value": "Acme Corp" },
      { "name": "documentId", "value": "INV-001" },
      { "name": "companyName", "value": "DeepXL" },
      { "name": "companyId", "value": "COMP-001" }
    ],
    "files": [
      {
        "category": "original_file",
        "fileName": "fd_42_bank_statement.pdf",
        "fileSize": 245678,
        "contentType": "application/pdf",
        "timestamp": 1725795600,
        "timestampISO": "2024-09-08T10:00:00.000000",
        "url": "https://api.deepxl.ai/v1/files/fd_42_bank_statement.pdf"
      },
      {
        "category": "heatmap",
        "fileName": "fd_42_heatmap_1.png",
        "fileSize": 45678,
        "contentType": "image/png",
        "timestamp": 1725795600,
        "timestampISO": "2024-09-08T10:00:00.000000",
        "url": "https://api.deepxl.ai/v1/files/fd_42_heatmap_1.png"
      }
    ]
  }
}

Field Reference

FieldTypeDescription
detectionIdintegerUnique identifier for the detection record
mediaTypestringMedia type category (image or document)
fileTypestringFile extension (jpeg, png, pdf, webp)
fileNamestringOriginal uploaded file name
fileSizeintegerFile size in bytes
timestampintegerUnix timestamp of the analysis
timestampISOstringISO 8601 timestamp of the analysis
modelstringModel used (document or object)
modelVersionstringVersion of the model used for analysis
likelihoodfloatFraud likelihood as a percentage (0–100)
fraudSeveritystringSeverity level: low, medium, or high
classificationstringQuality assessment: verified, unverified, or rejected
reasoningstring[]Natural-language explanations of the analysis findings
modelResultsobjectContains technicalChecks array with detailed check results
tagsobject[]Metadata tags attached to this detection
filesobject[]Associated files (original upload, heatmaps)

Understanding Results

Likelihood Score

The likelihood field is a 0–100% score indicating the probability of fraud or manipulation:
RangeSeverityInterpretation
0–29%lowNo significant indicators of manipulation
30–69%mediumSome indicators of manipulation detected
70–100%highStrong indicators of fraud detected

Classification

The classification field indicates the document quality assessment — whether the document passed all quality gates and could be properly analyzed. This is separate from the fraud result (likelihood / fraudSeverity).
ClassificationMeaning
verifiedDocument quality is good — passed all quality gates and was fully analyzed
unverifiedDocument quality is insufficient — image is blurry, corners are cut off, or semantic quality checks failed
rejectedDocument type is not supported, text content is insufficient, or multiple documents were submitted in a single file

Reasoning

The reasoning array contains natural-language explanations of the analysis findings. Each entry describes a specific observation or conclusion from the forensic analysis.

Technical Checks

The modelResults.technicalChecks array contains the individual forensic checks performed on the file. The number and type of checks varies depending on the model, file type, and document content. Each check object includes:
FieldTypeDescription
typestringCheck identifier
statusstringPASS, FAIL, WARNING, or NOT_PRESENT
detailsstringHuman-readable explanation of the check result
likelihoodfloatConfidence score for this specific check (0.0–1.0)

Status Values

StatusMeaning
PASSCheck passed — no issues found
FAILCheck failed — issue detected
WARNINGPotential concern — not conclusive but worth noting
NOT_PRESENTCheck could not be performed — required data was not available in the file

Document Model

The document model runs a multi-stage pipeline. First, a series of quality gates determine the classification (whether the document can be properly analyzed). Then, parallel fraud checks analyze the document for manipulation and determine the likelihood score. Additional checks may run depending on the file type and document category.

Object Model

The object model returns fraud detection results via the top-level likelihood, fraudSeverity, and reasoning fields. The technicalChecks array will be empty for the object model. When AI generation or manipulation is detected, a heatmap is included in the files array highlighting the suspicious regions.

Heatmaps

Both the document and object models can generate heatmap images that visually highlight the affected regions. Heatmaps make it easy to see exactly where tampering or AI generation was detected.

How Heatmaps Work

  • Heatmaps are PNG images overlaid on the original document or image
  • Document model: for multi-page PDFs, each page gets its own heatmap (fd_{id}_heatmap_1.png, fd_{id}_heatmap_2.png, etc.)
  • Object model: a single heatmap is generated per image (fd_{id}_heatmap_1.png)
  • Heatmaps are only generated when manipulation or AI generation is detected
  • They appear in the files array with category: "heatmap"

Retrieving Heatmaps

Heatmap URLs are included in the detection response under files:
{
  "files": [
    {
      "category": "original_file",
      "fileName": "fd_42_bank_statement.pdf",
      "url": "https://api.deepxl.ai/v1/files/fd_42_bank_statement.pdf"
    },
    {
      "category": "heatmap",
      "fileName": "fd_42_heatmap_1.png",
      "url": "https://api.deepxl.ai/v1/files/fd_42_heatmap_1.png"
    },
    {
      "category": "heatmap",
      "fileName": "fd_42_heatmap_2.png",
      "url": "https://api.deepxl.ai/v1/files/fd_42_heatmap_2.png"
    }
  ]
}
Download a heatmap using the file retrieval endpoint:
curl https://api.deepxl.ai/v1/files/fd_42_heatmap_1.png \
  -H "x-api-key: YOUR_API_KEY" \
  --output heatmap_page1.png

File Categories

CategoryDescription
original_fileThe file you originally uploaded
heatmapGenerated heatmap highlighting detected manipulation regions

Error Codes

StatusErrorDescription
400Bad RequestInvalid model name, invalid sort parameter, malformed JSON in tags, or invalid query parameters
401UnauthorizedMissing or invalid API key
404Not FoundDetection record not found
413Payload Too LargeFile exceeds the 50 MB maximum size
415Unsupported Media TypeFile type is not supported by the selected model
500Internal Server ErrorUnexpected server error — contact support if persistent
502Bad GatewayUpstream analysis service is temporarily unavailable — retry after a short delay

Tags and Filtering

Pass a JSON object in the tags parameter to attach metadata to your analysis:
{
  "customerId": "9999",
  "customerName": "Acme Corp",
  "documentId": "DOC-2024-001",
  "companyName": "DeepXL",
  "companyId": "COMP-001"
}
Filter your detection history by tags:
curl "https://api.deepxl.ai/v1/detection?tagFilter=customerId=9999" \
  -H "x-api-key: YOUR_API_KEY"

Browsing History

Retrieve paginated detection results with sorting and filtering:
curl "https://api.deepxl.ai/v1/detection?limit=25&offset=0&sortBy=createdOn&direction=desc" \
  -H "x-api-key: YOUR_API_KEY"

Query Parameters

ParameterTypeDescription
limitintegerNumber of results per page (default: 25)
offsetintegerNumber of results to skip
sortBystringField to sort by (see options below)
directionstringasc or desc
minLikelihoodfloatMinimum likelihood filter (0–100)
maxLikelihoodfloatMaximum likelihood filter (0–100)
fraudSeveritystringFilter by severity: low, medium, or high
classificationstringFilter by classification: verified, unverified, or rejected
tagFilterstringFilter by tag (format: key=value)
minTimestampintegerMinimum Unix timestamp
maxTimestampintegerMaximum Unix timestamp

Sort Options

fraudDetectionId, fileName, fileSize, fileType, model, likelihood, createdOn