Skip to main content
Java library for DeepXL fraud detection services.

GitHub Repository

View source code and contribute on GitHub

Installation

Maven

Add the following dependency to your pom.xml:
<dependency>
    <groupId>com.deepxl.sdk</groupId>
    <artifactId>deepxl</artifactId>
    <version>1.0.0</version>
</dependency>

Example

To use the DeepXL client, you must first create an API key in the dashboard. Navigate to Settings -> API Keys -> Create API Key.
Treat your API key like any environment secret. Do not commit to a public repository or store in plain text.
import deepxl.DeepXLClient;
import deepxl.DeepXLError;
import deepxl.AnalysisResult;

DeepXLClient client = new DeepXLClient(System.getenv("DEEPXL_API_KEY"));

try {
    AnalysisResult result = client.analyzeFile("document", "./file.pdf");
    System.out.println(result.likelihood);
} catch (DeepXLError e) {
    // Handle error
}

Client Methods

checkUsage

Returns the monthly usage quota and current usage for the payment period for each media type.

Returns

Returns a UsageResponse object:
PropertyType
imageUsageLimitint
imageUsageint
videoUsageLimitint
videoUsageint
audioUsageLimitint
audioUsageint
documentUsageLimitint
documentUsageint

analyze

Analyze file data with DeepXL fraud detection.

Inputs

ParameterTypeDescription
modelNameStringModel to use (document, object)
fileNameStringName of the file to analyze
fileDatabyte[]Byte array of file data
While you can use a constant string as file name, it is recommended you use unique identifiers to make files easier to find in analysis history.

analyzeFile

Analyze a file by path. Does the same thing as analyze but takes a file path instead of binary data.

Inputs

ParameterTypeDescription
modelNameStringModel to use (document, object)
filePathStringPath to the file

Returns

Both analyze and analyzeFile return an AnalysisResult object:
PropertyTypeDescription
likelihooddoublePercent likelihood (0-100) that the file has been manipulated
reasoningString[]Model reasoning
modelResultsObjectModel-specific outputs