Node/Typescript Software Development Kit for DeepXL fraud detection services

Installation

Install the SDK using npm
npm install deepxl-node-sdk

Example

To use the DeepXL client, you must first create an API key in the dashboard. You can create a new API key in Settings -> API Keys -> Create API Key. Treat this API key like you would any environment secret. Do not commit to a public repository or store in plain text.
import { DeepXLClient } from 'deepxl-node-sdk';

const client = new DeepXLClient(MY_API_KEY);

let analysisResult = client.analyzeFile("documents-model", ".\\file.pdf")

Client methods

checkUsage

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

Returns:

Returns a UsageResponse object with the following properties:
PropertyType
imageUsageLimitnumber
imageUsagenumber
videoUsageLimitnumber
videoUsagenumber
audioUsageLimitnumber
audioUsagenumber
documentUsageLimitnumber
documentUsagenumber

analyze

Analyze file data with DeepXL fraud detection.

Inputs

  • modelName: the name of the model to use. You can find a complete list in our docs.
  • fileName: the name of the file to analyze
  • fileData: byte array of file data to analyze
Note: 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 file with DeepXL fraud detection. This does the same thing as analyze but takes a file path as input instead of binary file data.

Inputs

  • modelName: the name of the model to use. You can find a complete list in our docs.
  • file: path of the file to analyze

Returns

Both analyze and analyzeFile return an AnalysisResponse object with the following properties:
PropertyTypeDescription
likelihoodnumberThe percent likelihood that the file has been manipulated
reasoningstring[]model reasoning
modelResultsObjectmodel-specific outputs