Links

Build On Device Model

Generate code to run the impulse on an embedded device. When this step is complete use `downloadBuild` to download the artefacts. Updates are streamed over the websocket API.
post
https://studio.edgeimpulse.com/v1
/api/{projectId}/jobs/build-ondevice-model
Build on-device model

Generate code to run the impulse on an embedded device. When this step is complete use downloadBuild to download the artefacts. Updates are streamed over the websocket API.

Parameters
Path
projectId*
integer
Project ID
Query
type*
string
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.
Body
Example
Schema
{
"engine": "tflite",
"modelType": "int8"
}
Responses
200: OK
OK
cURL
Python
Node.js
curl --request POST \
--url 'https://studio.edgeimpulse.com/v1/api/{projectId}/jobs/build-ondevice-model?type=SOME_STRING_VALUE' \
--header 'content-type: application/json' \
--header 'x-jwt-token: REPLACE_KEY_VALUE' \
--data '{"engine":"tflite","modelType":"int8"}'
import http.client
conn = http.client.HTTPSConnection("studio.edgeimpulse.com")
payload = "{\"engine\":\"tflite\",\"modelType\":\"int8\"}"
headers = {
'content-type': "application/json",
'x-jwt-token': "REPLACE_KEY_VALUE"
}
conn.request("POST", "/v1/api/{projectId}/jobs/build-ondevice-model?type=SOME_STRING_VALUE", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const request = require('request');
const options = {
method: 'POST',
url: 'https://studio.edgeimpulse.com/v1/api/{projectId}/jobs/build-ondevice-model',
qs: {type: 'SOME_STRING_VALUE'},
headers: {'content-type': 'application/json', 'x-jwt-token': 'REPLACE_KEY_VALUE'},
body: {engine: 'tflite', modelType: 'int8'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});