π€AI Analysis API
Create an AI Scan
Name
Value
Name
Type
Description
file1 = Path('./example.sol').read_text()
file2 = Path('./example2.sol').read_text()
file3 = Path('./example3.sol').read_text()
key = "<your auditbase key>"
route = 'v1/scans/ai/upload'
url = host + route
post_data = {
"params":{
"name": "scan1",
"files": {"file1.sol": file1, "file2.sol": file2, "file3.sol": file3},
"webhook_url": "https://<your call url>/webhook",
"scan_type": "cosmos"
},
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {key}',
}
response = requests.post(url, json=post_data, headers=headers)
print("response: ", response.json())
Last updated