Edge Impulse Learn API

The Learn API from Edge Impulse — 21 operation(s) for learn.

OpenAPI Specification

edge-impulse-learn-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Edge Impulse Learn API
  version: 1.0.0
servers:
- url: https://studio.edgeimpulse.com/v1
security:
- ApiKeyAuthentication: []
- JWTAuthentication: []
- JWTHttpHeaderAuthentication: []
tags:
- name: Learn
paths:
  /api/{projectId}/training/{learnId}/x:
    get:
      summary: Download data
      description: Download the processed data for this learning block. This is data already processed by the signal processing blocks.
      operationId: getLearnXData
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/{learnId}/y:
    get:
      summary: Download labels
      description: Download the labels for this learning block. This is data already processed by the signal processing blocks. Not all blocks support this function. If so, a GenericApiResponse is returned with an error message.
      operationId: getLearnYData
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: Numpy binary file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/anomaly/{learnId}:
    get:
      summary: Anomaly information
      description: Get information about an anomaly block, such as its dependencies. Use the impulse blocks to find the learnId.
      operationId: getAnomaly
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyConfigResponse'
    post:
      summary: Anomaly settings
      description: Configure the anomaly block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
      operationId: setAnomaly
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAnomalyParameterRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/anomaly/{learnId}/metadata:
    get:
      summary: Anomaly metadata
      description: Get metadata about a trained anomaly block. Use the impulse blocks to find the learnId.
      operationId: getAnomalyMetadata
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyModelMetadataResponse'
  /api/{projectId}/training/anomaly/{learnId}/gmm/metadata:
    get:
      summary: Anomaly GMM metadata
      description: Get raw model metadata of the Gaussian mixture model (GMM) for a trained anomaly block. Use the impulse blocks to find the learnId.
      operationId: getGmmMetadata
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyGmmMetadataResponse'
  /api/{projectId}/training/keras/{learnId}:
    get:
      summary: Keras information
      description: Get information about a Keras block, such as its dependencies. Use the impulse blocks to find the learnId.
      operationId: getKeras
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KerasResponse'
    post:
      summary: Keras settings
      description: Configure the Keras block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
      operationId: setKeras
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetKerasParameterRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/keras/{learnId}/metadata:
    get:
      summary: Keras metadata
      description: Get metadata about a trained Keras block. Use the impulse blocks to find the learnId.
      operationId: getKerasMetadata
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      - $ref: '#/components/parameters/ExcludeLabelsParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KerasModelMetadataResponse'
  /api/{projectId}/training/keras/{learnId}/data-explorer/features:
    get:
      summary: Get data explorer features
      description: t-SNE2 output of the raw dataset using embeddings from this Keras block
      operationId: getKerasDataExplorerFeatures
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDataExplorerFeaturesResponse'
  /api/{projectId}/training/keras/{learnId}/files:
    post:
      summary: Upload Keras files
      description: Replace Keras block files with the contents of a zip. This is an internal API.
      x-internal-api: true
      security:
      - permissions:
        - projects:training:keras:write
      operationId: uploadKerasFiles
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadKerasFilesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/keras/{learnId}/addFiles:
    post:
      summary: Add Keras files
      description: Add Keras block files with the contents of a zip. This is an internal API.
      x-internal-api: true
      security:
      - permissions:
        - projects:training:keras:write
      operationId: addKerasFiles
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddKerasFilesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/training/keras/{learnId}/download-export:
    get:
      summary: Download Keras export
      description: Download an exported Keras block - needs to be exported via 'exportKerasBlock' first
      operationId: downloadKerasExport
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: File
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/keras/{learnId}/download-data:
    get:
      summary: Download Keras data export
      description: Download the data of an exported Keras block - needs to be exported via 'exportKerasBlockData' first
      operationId: downloadKerasData
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      responses:
        '200':
          description: File
          content:
            application/zip:
              schema:
                type: string
                format: binary
  /api/{projectId}/learn-data/{learnId}/model/{modelDownloadId}:
    get:
      summary: Download trained model
      description: Download a trained model for a learning block. Depending on the block this can be a TensorFlow model, or the cluster centroids.
      operationId: downloadLearnModel
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      - $ref: '#/components/parameters/ModelDownloadIdParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /api/{projectId}/training/anomaly/{learnId}/features/get-graph:
    get:
      summary: Trained features
      description: Get a sample of trained features, this extracts a number of samples and their features.
      operationId: anomalyTrainedFeatures
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      - $ref: '#/components/parameters/FeatureAx1Parameter'
      - $ref: '#/components/parameters/FeatureAx2Parameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyTrainedFeaturesResponse'
  /api/{projectId}/training/anomaly/{learnId}/features/get-graph/classification/{sampleId}:
    get:
      summary: Trained features for sample
      description: Get trained features for a single sample. This runs both the DSP prerequisites and the anomaly classifier.
      operationId: anomalyTrainedFeaturesPerSample
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/LearnIdParameter'
      - $ref: '#/components/parameters/SampleIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnomalyTrainedFeaturesResponse'
  /api/{projectId}/pretrained-model:
    get:
      summary: Get pretrained model
      description: 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`.
      operationId: getPretrainedModelInfo
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPretrainedModelResponse'
  /api/{projectId}/pretrained-model/upload:
    post:
      summary: Upload a pretrained model
      description: Upload a pretrained model and receive info back about the input/output tensors. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
      operationId: uploadPretrainedModel
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadPretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/pretrained-model/save:
    post:
      summary: Save parameters for pretrained model
      description: Save input / model configuration for a pretrained model. This overrides the current impulse. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
      operationId: savePretrainedModelParameters
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavePretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericApiResponse'
  /api/{projectId}/pretrained-model/test:
    post:
      summary: Test pretrained model
      description: Test out a pretrained model (using raw features) - upload first via  `uploadPretrainedModel`. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
      operationId: testPretrainedModel
      tags:
      - Learn
      x-middleware:
      - AllowsReadOnly
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestPretrainedModelRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPretrainedModelResponse'
  /api/{projectId}/pretrained-model/profile:
    post:
      summary: Profile pretrained model
      description: Returns the latency, RAM and ROM used for the pretrained model - upload first via  `uploadPretrainedModel`. This is using the project's selected latency device. Updates are streamed over the websocket API (or can be retrieved through the /stdout endpoint). Use getProfileTfliteJobResult to get the results when the job is completed.
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      operationId: profilePretrainedModel
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobResponse'
  /api/{projectId}/pretrained-model/download/{pretrainedModelDownloadType}:
    get:
      summary: Download pretrained model
      description: Download a pretrained model file
      operationId: downloadPretrainedModel
      tags:
      - Learn
      parameters:
      - $ref: '#/components/parameters/ProjectIdParameter'
      - $ref: '#/components/parameters/PretrainedModelDownloadParameter'
      - $ref: '#/components/parameters/OptionalImpulseIdParameter'
      responses:
        '200':
          description: File
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
components:
  schemas:
    BlockDisplayCategory:
      description: Category to display this block in the UI.
      type: string
      enum:
      - classical
      - tao
    KerasModelVariantEnum:
      type: string
      enum:
      - int8
      - float32
      - akida
    AnomalyGmmMetadata:
      type: object
      required:
      - means
      - covariances
      - weights
      properties:
        means:
          type: array
          items:
            type: array
            items:
              type: number
          description: 2D array of shape (n, m)
        covariances:
          type: array
          items:
            type: array
            items:
              type: array
              items:
                type: number
          description: 3D array of shape (n, m, m)
        weights:
          type: array
          items:
            type: number
          description: 1D array of shape (n,)
    ProfileModelTableMcu:
      type: object
      required:
      - description
      - supported
      properties:
        description:
          type: string
        timePerInferenceMs:
          type: integer
        memory:
          type: object
          properties:
            tflite:
              type: object
              required:
              - ram
              - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
            eon:
              type: object
              required:
              - ram
              - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
            eonRamOptimized:
              type: object
              required:
              - ram
              - rom
              properties:
                ram:
                  type: integer
                rom:
                  type: integer
        supported:
          type: boolean
        mcuSupportError:
          type: string
    BlockType:
      type: string
      enum:
      - official
      - personal
      - enterprise
      - pro-or-enterprise
      - community
    StartJobResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - type: object
        required:
        - id
        properties:
          id:
            type: integer
            description: Job identifier. Status updates will include this identifier.
            example: 12873488112
    DeployPretrainedModelInputImage:
      type: object
      required:
      - inputType
      properties:
        inputType:
          type: string
          enum:
          - image
        inputScaling:
          $ref: '#/components/schemas/ImageInputScaling'
    ImpulseInputBlock:
      type: object
      required:
      - id
      - type
      - name
      - title
      - primaryVersion
      properties:
        id:
          type: integer
          minimum: 1
          description: Identifier for this block. Make sure to up this number when creating a new block, and don't re-use identifiers. If the block hasn't changed, keep the ID as-is. ID must be unique across the project and greather than zero (>0).
        type:
          type: string
          description: Block type (either time-series, image or features)
          example: time-series
          enum:
          - time-series
          - image
          - features
        name:
          type: string
          description: Block name, will be used in menus
          example: Time series
        title:
          type: string
          description: Block title, used in the impulse UI
          example: Time series
        windowSizeMs:
          type: integer
          description: Size of the sliding window in milliseconds
          example: 2004
        windowIncreaseMs:
          type: integer
          description: We use a sliding window to go over the raw data. How many milliseconds to increase the sliding window with for each step.
        frequencyHz:
          type: number
          description: (Input only) Frequency of the input data in Hz
          example: 60
        classificationWindowIncreaseMs:
          type: integer
          description: We use a sliding window to go over the raw data. How many milliseconds to increase the sliding window with for each step in classification mode.
        padZeros:
          type: boolean
          description: Whether to zero pad data when a data item is too short
        imageWidth:
          type: integer
          description: Width all images are resized to before training
          example: 28
        imageHeight:
          type: integer
          description: Width all images are resized to before training
          example: 28
        resizeMode:
          type: string
          description: How to resize images before training
          example: squash
          enum:
          - squash
          - fit-short
          - fit-long
          - crop
        resizeMethod:
          type: string
          description: Resize method to use when resizing images
          example: squash
          enum:
          - lanczos3
          - nearest
        cropAnchor:
          type: string
          description: If images are resized using a crop, choose where to anchor the crop
          example: middle-center
          enum:
          - top-left
          - top-center
          - top-right
          - middle-left
          - middle-center
          - middle-right
          - bottom-left
          - bottom-center
          - bottom-right
        description:
          type: string
          description: A short description of the block version, displayed in the block versioning UI
          example: Reduced learning rate and more layers
        createdBy:
          type: string
          description: The system component that created the block version (createImpulse | clone | tuner). Cannot be set via API.
          example: createImpulse
        createdAt:
          type: string
          format: date-time
          description: The datetime that the block version was created. Cannot be set via API.
        datasetSubset:
          type: object
          description: Only generate features for samples where (sample_id + datasetSubsetSeed) % datasetSubset) == 0
          required:
          - datasetSubset
          - datasetSubsetSeed
          properties:
            subsetModulo:
              type: number
            subsetSeed:
              type: number
    AddKerasFilesRequest:
      type: object
      required:
      - zip
      properties:
        zip:
          type: string
          format: binary
    ProfileModelTable:
      type: object
      required:
      - variant
      - lowEndMcu
      - highEndMcu
      - highEndMcuPlusAccelerator
      - mpu
      - gpuOrMpuAccelerator
      description: Performance for a range of device types. Note that MPU is referred to as CPU in Studio, as MPU and CPU are treated equivalent for performance estimation.
      properties:
        variant:
          type: string
          enum:
          - int8
          - float32
        lowEndMcu:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        highEndMcu:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        highEndMcuPlusAccelerator:
          $ref: '#/components/schemas/ProfileModelTableMcu'
        mpu:
          $ref: '#/components/schemas/ProfileModelTableMpu'
        gpuOrMpuAccelerator:
          $ref: '#/components/schemas/ProfileModelTableMpu'
    AnomalyConfig:
      type: object
      required:
      - name
      - axes
      - trained
      - dependencies
      - selectedAxes
      - minimumConfidenceRating
      properties:
        dependencies:
          $ref: '#/components/schemas/DependencyData'
        name:
          type: string
        axes:
          type: array
          description: Selectable axes for the anomaly detection block
          items:
            type: object
            required:
            - label
            - selected
            - favourite
            properties:
              label:
                type: string
              selected:
                type: boolean
              favourite:
                type: boolean
        trained:
          type: boolean
          description: Whether the block is trained
        clusterCount:
          type: integer
          description: Number of clusters for K-means, or number of components for GMM (in config)
        selectedAxes:
          type: array
          items:
            type: integer
          description: Selected clusters (in config)
        minimumConfidenceRating:
          type: number
          description: Minimum confidence rating for this block, scores above this number will be flagged as anomaly.
    BlockParameters:
      description: Training parameters specific to the type of the learn block. Parameters may be adjusted depending on the model defined in the visual layers. Used for our built-in blocks.
      oneOf:
      - $ref: '#/components/schemas/BlockParamsVisualAnomalyPatchcore'
      - $ref: '#/components/schemas/BlockParamsVisualAnomalyGmm'
    GetDataExplorerFeaturesResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - type: object
        required:
        - hasFeatures
        - data
        properties:
          hasFeatures:
            type: boolean
          data:
            type: array
            items:
              type: object
              required:
              - X
              - y
              - yLabel
              properties:
                X:
                  type: object
                  description: Data by feature index for this window
                  example: '`{ 0: 9.81, 11: 0.32, 22: 0.79 }`'
                  additionalProperties:
                    type: number
                y:
                  type: integer
                  description: Training label index
                yLabel:
                  type: string
                  description: Training label string
                sample:
                  type: object
                  required:
                  - id
                  - name
                  - startMs
                  - endMs
                  - category
                  properties:
                    id:
                      type: number
                    name:
                      type: string
                    startMs:
                      type: number
                    endMs:
                      type: number
                    category:
                      type: string
                      enum:
                      - training
                      - testing
          inputBlock:
            $ref: '#/components/schemas/ImpulseInputBlock'
    AnomalyCapacity:
      type: string
      description: Capacity level for visual anomaly detection. Determines which set of default configurations to use. The higher capacity, the higher number of (Gaussian) components, and the more adapted the model becomes to the original distribution
      enum:
      - low
      - medium
      - high
    TestPretrainedModelRequest:
      type: object
      required:
      - features
      - modelInfo
      properties:
        features:
          type: array
          items:
            type: number
        modelInfo:
          type: object
          required:
          - input
          - model
          properties:
            input:
              discriminator:
                propertyName: inputType
                mapping:
                  time-series: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
                  audio: '#/components/schemas/DeployPretrainedModelInputAudio'
                  image: '#/components/schemas/DeployPretrainedModelInputImage'
                  other: '#/components/schemas/DeployPretrainedModelInputOther'
              oneOf:
              - $ref: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
              - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
              - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
              - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
            model:
              discriminator:
                propertyName: modelType
                mapping:
                  classification: '#/components/schemas/DeployPretrainedModelModelClassification'
                  regression: '#/components/schemas/DeployPretrainedModelModelRegression'
                  object-detection: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
              oneOf:
              - $ref: '#/components/schemas/DeployPretrainedModelModelClassification'
              - $ref: '#/components/schemas/DeployPretrainedModelModelRegression'
              - $ref: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
    KerasCustomMetric:
      type: object
      required:
      - name
      - value
      properties:
        name:
          description: The name of the metric
          type: string
        value:
          description: The value of this metric for this model type
          type: string
    DeployPretrainedModelInputOther:
      type: object
      required:
      - inputType
      properties:
        inputType:
          type: string
          enum:
          - other
    DeployPretrainedModelModelClassification:
      type: object
      required:
      - modelType
      - labels
      properties:
        modelType:
          type: string
          enum:
          - classification
        labels:
          type: array
          items:
            type: string
    TestPretrainedModelResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - type: object
        properties:
          result:
            type: object
            description: Classification value per label. For a neural network this will be the confidence, for anomalies the anomaly score.
            additionalProperties:
              type: number
          boundingBoxes:
            type: array
            items:
              $ref: '#/components/schemas/BoundingBoxWithScore'
    SavePretrainedModelRequest:
      type: object
      required:
      - input
      - model
      properties:
        input:
          discriminator:
            propertyName: inputType
            mapping:
              time-series: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
              audio: '#/components/schemas/DeployPretrainedModelInputAudio'
              image: '#/components/schemas/DeployPretrainedModelInputImage'
              other: '#/components/schemas/DeployPretrainedModelInputOther'
          oneOf:
          - $ref: '#/components/schemas/DeployPretrainedModelInputTimeSeries'
          - $ref: '#/components/schemas/DeployPretrainedModelInputAudio'
          - $ref: '#/components/schemas/DeployPretrainedModelInputImage'
          - $ref: '#/components/schemas/DeployPretrainedModelInputOther'
        model:
          discriminator:
            propertyName: modelType
            mapping:
              classification: '#/components/schemas/DeployPretrainedModelModelClassification'
              regression: '#/components/schemas/DeployPretrainedModelModelRegression'
              object-detection: '#/components/schemas/DeployPretrainedModelModelObjectDetection'
          oneOf:
          - $ref: '#/components/schemas/DeployPretrainedModelModelClassification'
          - $ref: '#/components/schemas/DeployPretrainedModelMo

# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/edge-impulse/refs/heads/main/openapi/edge-impulse-learn-api-openapi.yml