POST
/
api
/
{projectId}
/
jobs
/
deploy-pretrained-model
Deploy pretrained model
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/jobs/deploy-pretrained-model \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "modelFileBase64": "<string>",
  "modelFileType": "tflite",
  "deploymentType": "<string>",
  "engine": "tflite",
  "modelInfo": {
    "input": {
      "inputType": "time-series",
      "frequencyHz": 123,
      "windowLengthMs": 123
    },
    "model": {
      "modelType": "classification",
      "labels": [
        "<string>"
      ]
    }
  },
  "representativeFeaturesBase64": "<string>",
  "deployModelType": "int8",
  "useConverter": "onnx-tf"
}'
{
  "success": true,
  "error": "<string>",
  "id": 12873488112
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

Query Parameters

impulseId
integer

Impulse ID. If this is unset then the default impulse is used.

Body

application/json
modelFileBase64
string
required

A base64 encoded pretrained model

modelFileType
enum<string>
required
Available options:
tflite,
onnx,
saved_model,
lgbm,
xgboost,
pickle
deploymentType
string
required

The name of the built target. You can find this by listing all deployment targets through listDeploymentTargetsForProject (via GET /v1/api/{projectId}/deployment/targets) and see the format type.

modelInfo
object
required
engine
enum<string>
Available options:
tflite,
tflite-eon,
tflite-eon-ram-optimized,
tensorrt,
tensaiflow,
drp-ai,
tidl,
akida,
syntiant,
memryx,
neox,
ethos-linux,
st-aton,
ceva-npn
representativeFeaturesBase64
string

A base64 encoded .npy file containing the features from your validation set (optional for onnx and saved_model) - used to quantize your model.

deployModelType
enum<string>
Available options:
int8,
float32
useConverter
enum<string>

Optional, use a specific converter (only for ONNX models).

Available options:
onnx-tf,
onnx2tf

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

id
integer
required

Job identifier. Status updates will include this identifier.

Example:

12873488112

error
string

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