Installation
Install the SDK using pipExample
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
check_usage
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 |
|---|---|
| image_usage_limit | int |
| image_usage | int |
| video_usage_limit | int |
| video_usage | int |
| audio_usage_limit | int |
| audio_usage | int |
| document_usage_limit | int |
| document_usage | int |
analyze
Analyze file data with DeepXL fraud detection.Inputs
- model_name: the name of the model to use. You can find a complete list in our docs.
- file_name: the name of the file to analyze
- file_data: 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.
analyze_file
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
- model_name: 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 analyze_file return an AnalysisResult object with the following properties:
| Property | Type | Description |
|---|---|---|
| likelihood | float | The percent likelihood that the file has been manipulated |
| reasoning | str[] | model reasoning |
| model_results | dict | model-specific outputs |
