Installation
Install the SDK using npmExample
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.Client methods
checkUsage
Returns the monthly usage quota and current usage for the payment period for each media type.Returns:
Returns aUsageResponse
object with the following properties:
Property | Type |
---|---|
imageUsageLimit | number |
imageUsage | number |
videoUsageLimit | number |
videoUsage | number |
audioUsageLimit | number |
audioUsage | number |
documentUsageLimit | number |
documentUsage | number |
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 asanalyze
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
Bothanalyze
and analyzeFile
return an AnalysisResponse
object with the following properties:
Property | Type | Description |
---|---|---|
likelihood | number | The percent likelihood that the file has been manipulated |
reasoning | string[] | model reasoning |
modelResults | Object | model-specific outputs |