---
title: "Build on-device model"
method: POST
path: "/api/{projectId}/jobs/build-ondevice-model"
tags: ["Jobs"]
---

# Build on-device model

`POST /api/{projectId}/jobs/build-ondevice-model`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/jobs/build-ondevice-model`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/:projectId/jobs/build-ondevice-model/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Path parameters

- `projectId` integer, required

## Query parameters

- `type` string, required
- `impulseId` integer

## Request body

- BuildOnDeviceModelRequest
  - `engine` 'tflite' | 'tflite-eon' | 'tflite-eon-ram-optimized' | 'tensorrt' | 'tensaiflow' | 'drp-ai' | 'tidl' | 'akida' | 'syntiant' | 'memryx' | 'neox' | 'ethos-linux' | 'st-aton' | 'ceva-npn' | 'nordic-axon' | 'vlm-connector' | 'qaic', required
  - `modelType` 'int8' | 'float32' | 'akida'
  - `parameters` object: List of custom parameters for this deployment job (see the list of parameters that the block exposes in DeploymentTarget#parameters).

## Response `200`

OK

- BuildOnDeviceModelResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `id` integer, required: Job identifier. Status updates will include this identifier.
  - `deploymentVersion` integer, required: Deployment version, use `downloadHistoricDeployment` to later download the deployment using this identifier.

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
