Get pretrained model
curl --request GET \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model \
--header 'x-api-key: <api-key>'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"specificDeviceSelected": true,
"availableModelTypes": [],
"error": "<string>",
"model": {
"fileName": "<string>",
"inputs": [
{
"name": "<string>",
"shape": [
123
],
"quantizationScale": 123,
"quantizationZeroPoint": 123
}
],
"outputs": [
{
"name": "<string>",
"shape": [
123
],
"quantizationScale": 123,
"quantizationZeroPoint": 123
}
],
"profileInfo": {
"table": {
"lowEndMcu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"highEndMcu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"highEndMcuPlusAccelerator": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"mpu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"rom": 123
},
"gpuOrMpuAccelerator": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"rom": 123
}
},
"float32": {
"device": "<string>",
"tfliteFileSizeBytes": 123,
"isSupportedOnMcu": true,
"customMetrics": [
{
"name": "<string>",
"value": "<string>"
}
],
"hasPerformance": true,
"memory": {
"tflite": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eon": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123,
"arenaSize": 123
}
},
"timePerInferenceMs": 123,
"mcuSupportError": "<string>",
"profilingError": "<string>"
},
"int8": {
"device": "<string>",
"tfliteFileSizeBytes": 123,
"isSupportedOnMcu": true,
"customMetrics": [
{
"name": "<string>",
"value": "<string>"
}
],
"hasPerformance": true,
"memory": {
"tflite": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eon": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123,
"arenaSize": 123
}
},
"timePerInferenceMs": 123,
"mcuSupportError": "<string>",
"profilingError": "<string>"
}
},
"profileJobId": 123,
"profileJobFailed": true,
"supportsTFLite": true
},
"modelInfo": {
"input": {
"inputType": "time-series",
"frequencyHz": 123,
"windowLengthMs": 123
},
"model": {
"modelType": "classification",
"labels": [
"<string>"
]
}
}
}Get pretrained model
Receive info back about the earlier uploaded pretrained model (via uploadPretrainedModel) input/output tensors. If you want to deploy a pretrained model from the API, see startDeployPretrainedModelJob.
GET
/
api
/
{projectId}
/
pretrained-model
Get pretrained model
curl --request GET \
--url https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model \
--header 'x-api-key: <api-key>'import requests
url = "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/{projectId}/pretrained-model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"specificDeviceSelected": true,
"availableModelTypes": [],
"error": "<string>",
"model": {
"fileName": "<string>",
"inputs": [
{
"name": "<string>",
"shape": [
123
],
"quantizationScale": 123,
"quantizationZeroPoint": 123
}
],
"outputs": [
{
"name": "<string>",
"shape": [
123
],
"quantizationScale": 123,
"quantizationZeroPoint": 123
}
],
"profileInfo": {
"table": {
"lowEndMcu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"highEndMcu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"highEndMcuPlusAccelerator": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"memory": {
"tflite": {
"ram": 123,
"rom": 123
},
"eon": {
"ram": 123,
"rom": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123
}
},
"mcuSupportError": "<string>"
},
"mpu": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"rom": 123
},
"gpuOrMpuAccelerator": {
"description": "<string>",
"supported": true,
"timePerInferenceMs": 123,
"rom": 123
}
},
"float32": {
"device": "<string>",
"tfliteFileSizeBytes": 123,
"isSupportedOnMcu": true,
"customMetrics": [
{
"name": "<string>",
"value": "<string>"
}
],
"hasPerformance": true,
"memory": {
"tflite": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eon": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123,
"arenaSize": 123
}
},
"timePerInferenceMs": 123,
"mcuSupportError": "<string>",
"profilingError": "<string>"
},
"int8": {
"device": "<string>",
"tfliteFileSizeBytes": 123,
"isSupportedOnMcu": true,
"customMetrics": [
{
"name": "<string>",
"value": "<string>"
}
],
"hasPerformance": true,
"memory": {
"tflite": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eon": {
"ram": 123,
"rom": 123,
"arenaSize": 123
},
"eonRamOptimized": {
"ram": 123,
"rom": 123,
"arenaSize": 123
}
},
"timePerInferenceMs": 123,
"mcuSupportError": "<string>",
"profilingError": "<string>"
}
},
"profileJobId": 123,
"profileJobFailed": true,
"supportsTFLite": true
},
"modelInfo": {
"input": {
"inputType": "time-series",
"frequencyHz": 123,
"windowLengthMs": 123
},
"model": {
"modelType": "classification",
"labels": [
"<string>"
]
}
}
}Authorizations
ApiKeyAuthenticationJWTAuthenticationJWTHttpHeaderAuthenticationOAuth2
Path Parameters
Project ID
Query Parameters
Impulse ID. If this is unset then the default impulse is used.
Response
200 - application/json
OK
Whether the operation succeeded
Whether a specific device was selected for performance profiling
The types of model that are available
Available options:
int8, float32, akida, requiresRetrain Optional error description (set if 'success' was false)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I