Test pretrained model

Test pretrained model

Test out a pretrained model (using raw features) - upload first via uploadPretrainedModel. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob.

POSThttps://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model/test
Path parameters
projectId*integer

Project ID

Body
features*array of number
modelInfo*object
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

resultobject

Classification value per label. For a neural network this will be the confidence, for anomalies the anomaly score.

boundingBoxesarray of BoundingBoxWithScore (object)
Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model/test', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "features": [
        0
      ],
      "modelInfo": {
        "input": {
          "inputType": "time-series",
          "frequencyHz": 0
        },
        "model": {
          "modelType": "classification",
          "labels": [
            "text"
          ]
        }
      }
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text",
  "boundingBoxes": [
    {
      "label": "text",
      "x": 0,
      "y": 0,
      "width": 0,