Skip to main content
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>",
  "modelInfo": {
    "input": {
      "inputType": "time-series",
      "frequencyHz": 123,
      "windowLengthMs": 123
    },
    "model": {
      "modelType": "classification",
      "labels": [
        "<string>"
      ]
    }
  },
  "engine": "tflite",
  "representativeFeaturesBase64": "<string>",
  "deployModelType": "int8",
  "useConverter": "onnx-tf",
  "overrideInputShape": [
    123
  ]
}
'
{
  "success": true,
  "id": 12873488112,
  "error": "<string>"
}

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,
ngboost
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,
nordic-axon
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
overrideInputShape
integer[]

Optional for ONNX files: overrides the input shape of the model. This is highly suggested if the model has dynamic dimensions. If this field is not set, then all dynamic dimensions will be set to '1'.

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)