Skip to main content
POST
/
api
/
{projectId}
/
pretrained-model
/
upload
Upload a pretrained model
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --form modelFile='@example-file' \
  --form 'modelFileName=<string>' \
  --form modelFileType=tflite \
  --form representativeFeatures='@example-file' \
  --form 'device=<string>' \
  --form 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

multipart/form-data
modelFile
file
required
modelFileName
string
required
modelFileType
enum<string>
required
Available options:
tflite,
onnx,
saved_model
representativeFeatures
file
device
string

MCU used for calculating latency, query latencyDevices in listProject for a list of supported devices (and use the "mcu" property here). If this is kept empty then we'll show an overview of multiple devices.

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)