AISpectra API Details

<Post> Model Registration

4min

POST /api/ais/v1.5/model_registration/upload

The model registration API is used to register AI/ML models. It returns a unique model ID and URLs to upload the required files. We have listed the required sample files. These are the the model, data, and label files and you are required to upload them. The purpose of this API is to provide vulnerability analysis and generate customized endpoint defense to keep models secure.
POST
Request
Header Parameters
x-api-key
required
String
Enter your API key
Org-Id
required
String
Enter your organization id
Body Parameters
task_type
required
String
Enter the name of the task type
analysis_type
required
String
Enter the name of the analysis type


Request Body

IC -MEA
IC - EVA
IC - POS
IS - MEA
TC - MEA
TC - EVA
TSF - MEA
NLP - MEA
TS - MEA
OD-EVA


The request body is a JSON object with the following fields:

  • task_type: The name of the task type. Possible values are IC (Image Classification, IS (Image Segmentation), TC (Tabular Classification), TSF (Time Series Forecasting), Text (NLP classification).
  • analysis_type: The name of the analysis type. Possible values are MEA (Model Extraction Attack), EVA (Model Evasion Attack), and data-poisoning or poisoning for (data poisoning) and model-poisoning for (model poisoning).

Model Upload Option

POST /ais/v1.5/model_registration/upload

After receiving the unique model ID and URLs from the vulnerability analysis API, users can upload the required data and track the progress further.

Note: All files uploaded to the specified URL should be in zipped format. This only needs to be done once for any model and multiple analyses can be performed. Check Image Classification, Image Segmentation Tabular Classification, Time Series Forecasting & Text Recommendation (Alpha-release), Object Detection to know the file upload format.

Note: The model, data, and label must be uploaded to the given link within ten minutes. For Image Classification Poisoning addition, two clean models are required. The model_id must be saved by the user for future use.

For using Nodejs sample code, install npm package request

Given ample code for python is tested for Python version 3.7

Given Sample code for nodejs and javascript is tested for Node V20LTS