> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edgeimpulse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build deployment (public)

> Create a deployment job for a _public_ project. You can only create deployments for "wasm" and "wasm-browser-simd" deployment types. 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`.



## OpenAPI

````yaml /.assets/openapi.yaml post /api/{projectId}/deployment/public/build
openapi: 3.0.0
info:
  title: Edge Impulse API
  version: 1.0.0
servers:
  - url: https://studio.edgeimpulse.com/v1
security:
  - ApiKeyAuthentication: []
  - JWTAuthentication: []
  - JWTHttpHeaderAuthentication: []
  - OAuth2: []
paths:
  /api/{projectId}/deployment/public/build:
    post:
      tags:
        - Deployment
      summary: Build deployment (public)
      description: >-
        Create a deployment job for a _public_ project. You can only create
        deployments for "wasm" and "wasm-browser-simd" deployment types. 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`.
      operationId: buildPublicDeploymentJob
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildPublicDeploymentJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildPublicDeploymentJobResponse'
components:
  parameters:
    ProjectIdParameter:
      name: projectId
      in: path
      required: true
      description: Project ID
      schema:
        type: integer
    OptionalImpulseIdParameter:
      name: impulseId
      in: query
      required: false
      description: Impulse ID. If this is unset then the default impulse is used.
      schema:
        type: integer
  schemas:
    BuildPublicDeploymentJobRequest:
      type: object
      required:
        - deploymentType
        - modelType
      properties:
        deploymentType:
          type: string
        modelType:
          $ref: '#/components/schemas/KerasModelVariantEnum'
    BuildPublicDeploymentJobResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - deploymentVersion
          properties:
            jobId:
              description: >-
                Set if a job was created (or was already running) for this
                deployment. Use this ID to poll to the job logs via
                'GetPublicDeploymentStatusResponse'.
              type: integer
            deploymentVersion:
              type: integer
              description: >-
                Deployment version. Use `downloadHistoricDeployment` to download
                the deployment using this identifier (once the job is finished).
    KerasModelVariantEnum:
      type: string
      enum:
        - int8
        - float32
        - akida
    GenericApiResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the operation succeeded
        error:
          type: string
          description: Optional error description (set if 'success' was false)
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: x-api-key
    JWTAuthentication:
      type: apiKey
      in: cookie
      name: jwt
    JWTHttpHeaderAuthentication:
      type: apiKey
      in: header
      name: x-jwt-token
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /v1/oauth/authorize
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        implicit:
          authorizationUrl: /v1/oauth/authorize
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        password:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        clientCredentials:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information

````