
Inlyse Classifier - Alpha
Hi! This is the testing version of our REST API that receives PDF files and returns predicted labels as malicious or benign, as well as the predicted scores for each label.
Also, visit us in inlyse.com
Authentication
You must have a valid API key to use this service. If you still do not have one, get in contact via info@inlyse.de
To successfully interact with the API you must set a header “X-Api-Key:<>” for all your POST requests.
POST /api/v1/pdf/sendfile
CURL:
$ curl -H "X-Api-Key:<<SET_YOUR_API_KEY_HERE>>" \
-F 'file=@<<set_the_file_with_path_here>>' \
https://api.inlyse.cloud/api/v1/pdf/sendfile
{
"label": "malicious",
"score_benign": "5.2452087e-06",
"score_malicious": "0.99999475"
}
Python
import requests
api_url = 'https://api.inlyse.cloud/api/v1/pdf/sendfile'
files = {'file': open('sample-malicious.pdf', 'rb')}
headers = {'X-Api-Key': '<<SET_YOUR_API_KEY_HERE>>'}
r = requests.post(api_url, files=files, headers=headers)
r.text
'{"label":"malicious","score_benign":"5.2452087e-06","score_malicious":"0.99999475"}\n'
Error Messages
'X-Api-Key' missing.- API key is not set in the request headers.'X-Api-Key' is not valid.- API key is not valid or is expired, contact us to renew it.Submitted file is not a PDF.- Perhaps the file sent is not a PDF.