---
title: "Build deployment (public)"
method: POST
path: "/api/{projectId}/deployment/public/build"
tags: ["Deployment"]
---

# Build deployment (public)

`POST /api/{projectId}/deployment/public/build`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/deployment/public/build`
- 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/deployment/public/build/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a deployment job for a _public_ project. If a deployment already exists, jobId is null. If a deployment did not exist, or a job is created, jobId is set to an integer, and you can get updates via `getPublicDeploymentStatus`. When this step is complete use `downloadHistoricDeployment` to download the artefacts using deploymentVersion. Updates are _NOT_ streamed over the websocket API (for security reasons); but can be obtained via `getPublicDeploymentStatus`.

## Path parameters

- `projectId` integer, required

## Query parameters

- `impulseId` integer

## Request body

- BuildPublicDeploymentJobRequest
  - `deploymentType` string, required
  - `modelType` 'int8' | 'float32' | 'akida', required

## Response `200`

OK

- BuildPublicDeploymentJobResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `jobId` integer: Set if a job was created (or was already running) for this deployment. Use this ID to poll to the job logs via 'GetPublicDeploymentStatusResponse'.
  - `deploymentVersion` integer, required: Deployment version. Use `downloadHistoricDeployment` to download the deployment using this identifier (once the job is finished).

---

[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)
