Edge Impulse Learn API

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

Operations 23

GET /api/{projectId}/training/{learnId}/x Download data #
GET /api/{projectId}/training/{learnId}/y Download labels #
GET /api/{projectId}/training/anomaly/{learnId} Anomaly information #
POST /api/{projectId}/training/anomaly/{learnId} Anomaly settings #
GET /api/{projectId}/training/anomaly/{learnId}/metadata Anomaly metadata #
GET /api/{projectId}/training/anomaly/{learnId}/gmm/metadata Anomaly GMM metadata #
GET /api/{projectId}/training/keras/{learnId} Keras information #
POST /api/{projectId}/training/keras/{learnId} Keras settings #
GET /api/{projectId}/training/keras/{learnId}/metadata Keras metadata #
GET /api/{projectId}/training/keras/{learnId}/data-explorer/features Get data explorer features #
POST /api/{projectId}/training/keras/{learnId}/files Upload Keras files #
POST /api/{projectId}/training/keras/{learnId}/addFiles Add Keras files #
GET /api/{projectId}/training/keras/{learnId}/download-export Download Keras export #
GET /api/{projectId}/training/keras/{learnId}/download-data Download Keras data export #
GET /api/{projectId}/learn-data/{learnId}/model/{modelDownloadId} Download trained model #
GET /api/{projectId}/training/anomaly/{learnId}/features/get-graph Trained features #
GET /api/{projectId}/training/anomaly/{learnId}/features/get-graph/classification/{sampleId} Trained features for sample #
GET /api/{projectId}/pretrained-model Get pretrained model #
POST /api/{projectId}/pretrained-model/upload Upload a pretrained model #
POST /api/{projectId}/pretrained-model/save Save parameters for pretrained model #
POST /api/{projectId}/pretrained-model/test Test pretrained model #
POST /api/{projectId}/pretrained-model/profile Profile pretrained model #
GET /api/{projectId}/pretrained-model/download/{pretrainedModelDownloadType} Download pretrained model #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/edge-impulse-learn-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

edge-impulse-learn-api-openapi.yml Raw ↑
openapi: 3.2.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:
    DependencyData:
      type: object
      required:
      - classes
      - blockNames
      - featureCount
      - sampleCount
      properties:
        classes:
          type: array
          items:
            type: string
        blockNames:
          type: array
          items:
            type: string
        featureCount:
          type: integer
        sampleCount:
          type: integer
    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.
    ProfileModelTableMpu:
      type: object
      required:
      - description
      - supported
      properties:
        description:
          type: string
        timePerInferenceMs:
          type: integer
        rom:
          type: number
        supported:
          type: boolean
    AnomalyTrainedFeaturesResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - type: object
        required:
        - totalSampleCount
        - data
        properties:
          totalSampleCount:
            type: integer
            description: Total number of windows in the data set
          data:
            type: array
            items:
              type: object
              required:
              - X
              properties:
                X:
                  type: object
                  description: Data by feature index for this window. Note that this data was scaled by the StandardScaler, use the anomaly metadata to unscale if needed.
                  example:
                    '0': -2.17
                    '11': 1.21
                    '22': 0.79
                  additionalProperties:
                    type: number
                label:
                  type: number
                  description: Label used for datapoint colorscale in anomaly explorer (for gmm only). Is currently the result of the scoring function.
    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,)
    AdditionalMetric:
      type: object
      required:
      - name
      - value
      - fullPrecisionValue
      properties:
        name:
          type: string
        value:
          type: string
        fullPrecisionValue:
          type: number
        tooltipText:
          type: string
        link:
          type: string
    PretrainedModelTensor:
      type: object
      required:
      - dataType
      - name
      - shape
      properties:
        dataType:
          type: string
          enum:
          - int8
          - uint8
          - float32
        name:
          type: string
        shape:
          type: array
          items:
            type: integer
        quantizationScale:
          type: number
        quantizationZeroPoint:
          type: number
    ObjectDetectionLastLayer:
      type: string
      enum:
      - mobilenet-ssd
      - fomo
      - yolov2-akida
      - yolov5
      - yolov5v5-drpai
      - yolox
      - yolov7
      - tao-retinanet
      - tao-ssd
      - tao-yolov3
      - tao-yolov4
    BlockParamsVisualAnomalyPatchcore:
      type: object
      properties:
        backbone:
          type: string
          description: The backbone to use for feature extraction
        numLayers:
          type: integer
          description: The number of layers in the feature extractor (1-3)
        poolSize:
          type: integer
          description: The pool size for the feature extractor
        samplingRatio:
          type: number
          description: The sampling ratio for the coreset, used for anomaly scoring
        numNearestNeighbors:
          type: integer
          description: The number of nearest neighbors to consider, used for anomaly scoring
    KerasResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - $ref: '#/components/schemas/KerasConfig'
    AddKerasFilesRequest:
      type: object
      required:
      - zip
      properties:
        zip:
          type: string
          format: binary
    TransferLearningModel:
      type: object
      required:
      - name
      - shortName
      - description
      - hasNeurons
      - hasDropout
      - type
      - author
      - blockType
      properties:
        name:
          type: string
        shortName:
          type: string
        abbreviatedName:
          type: string
        description:
          type: string
        hasNeurons:
          type: boolean
        hasDropout:
          type: boolean
        defaultNeurons:
          type: integer
        defaultDropout:
          type: number
        defaultLearningRate:
          type: number
        defaultTrainingCycles:
          type: number
        hasImageAugmentation:
          type: boolean
        type:
          $ref: '#/components/schemas/KerasVisualLayerType'
        learnBlockType:
          $ref: '#/components/schemas/LearnBlockType'
        organizationModelId:
          type: integer
        implementationVersion:
          type: integer
        repositoryUrl:
          type: string
          description: URL to the source code of this custom learn block.
        author:
          type: string
        blockType:
          $ref: '#/components/schemas/BlockType'
        customParameters:
          type: array
          items:
            $ref: '#/components/schemas/DSPGroupItem'
        displayCategory:
          $ref: '#/components/schemas/BlockDisplayCategory'
    BlockDisplayCategory:
      description: Category to display this block in the UI.
      type: string
      enum:
      - classical
      - tao
    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
    AugmentationPolicySpectrogram:
      type: object
      required:
      - enabled
      properties:
        enabled:
          type: boolean
          description: True if spectrogram augmentation is enabled. Other properties will be ignored if this is false.
        warping:
          type: boolean
          description: True if warping along the time axis is enabled.
        freqMasking:
          type: string
          enum:
          - none
          - low
          - high
          description: The amount of frequency masking to apply.
        timeMasking:
          type: string
          enum:
          - none
          - low
          - high
          description: The amount of time masking to apply.
        gaussianNoise:
          type: string
          enum:
          - none
          - low
          - high
          description: The amount of Gaussian noise to add.
    AkidaEdgeLearningConfig:
      type: object
      required:
      - enabled
      properties:
        enabled:
          type: boolean
          description: True if Akida Edge Learning model creation is enabled. Other properties will be ignored if this is false.
        additionalClasses:
          type: number
          description: Number of additional classes that will be added to the Edge Learning model.
        neuronsPerClass:
          type: number
          description: Number of neurons in each class on the last layer in the Edge Learning model.
    LearnBlockType:
      type: string
      description: The type of learning block (anomaly, keras, keras-transfer-image, keras-transfer-kws, keras-object-detection, keras-regression). Each behaves differently.
      enum:
      - anomaly
      - anomaly-gmm
      - keras
      - keras-transfer-image
      - keras-transfer-kws
      - keras-object-detection
      - keras-regression
      - keras-akida
      - keras-akida-transfer-image
      - keras-akida-object-detection
      - keras-visual-anomaly
    KerasModelMetadataMetrics:
      type: object
      required:
      - type
      - loss
      - confusionMatrix
      - report
      - onDevicePerformance
      - visualization
      - isSupportedOnMcu
      - additionalMetrics
      properties:
        type:
          description: The type of model
          $ref: '#/components/schemas/KerasModelTypeEnum'
        loss:
          type: number
          description: The model's loss on the validation set after training
        accuracy:
          type: number
          description: The model's accuracy on the validation set after training
        confusionMatrix:
          type: array
          example:
          - - 31
            - 1
            - 0
          - - 2
            - 27
            - 3
          - - 1
            - 0
            - 39
          items:
            type: array
            items:
              type: number
        report:
          type: object
          description: Precision, recall, F1 and support scores
        onDevicePerformance:
          type: array
          items:
            type: object
            required:
            - mcu
            - name
            - isDefault
            - latency
            - tflite
            - eon
            properties:
              mcu:
                type: string
              name:
                type: string
              isDefault:
                type: boolean
              latency:
                type: number
              tflite:
                type: object
                required:
                - ramRequired
                - romRequired
                - arenaSize
                - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              eon:
                type: object
                required:
                - ramRequired
                - romRequired
                - arenaSize
                - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              eon_ram_optimized:
                type: object
                required:
                - ramRequired
                - romRequired
                - arenaSize
                - modelSize
                properties:
                  ramRequired:
                    type: integer
                  romRequired:
                    type: integer
                  arenaSize:
                    type: integer
                  modelSize:
                    type: integer
              customMetrics:
                description: Custom, device-specific performance metrics
                type: array
                items:
                  $ref: '#/components/schemas/KerasCustomMetric'
        predictions:
          type: array
          items:
            $ref: '#/components/schemas/ModelPrediction'
        visualization:
          type: string
          enum:
          - featureExplorer
          - dataExplorer
          - none
        isSupportedOnMcu:
          type: boolean
        mcuSupportError:
          type: string
        profilingJobId:
          description: If this is set, then we're still profiling this model. Subscribe to job updates to see when it's done (afterward the metadata will be updated).
          type: integer
        profilingJobFailed:
          description: If this is set, then the profiling job failed (get the status by getting the job logs for 'profilingJobId').
          type: boolean
        additionalMetrics:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalMetric'
    DeployPretrainedModelModelClassification:
      type: object
      required:
      - modelType
      - labels
      properties:
        modelType:
          type: string
          enum:
          - classification
        labels:
          type: array
          items:
            type: string
    KerasModelMetadataResponse:
      allOf:
      - $ref: '#/components/schemas/GenericApiResponse'
      - $ref: '#/components/schemas/KerasModelMetadata'
    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'
    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:
                

# --- 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