---
title: "Update config"
method: POST
path: "/api/{projectId}/optimize/config"
tags: ["Optimization"]
---

# Update config

`POST /api/{projectId}/optimize/config`

## Request

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

Update config

## Path parameters

- `projectId` integer, required

## Request body

- OptimizeConfig
  - `name` string
  - `targetLatency` integer, required: Target latency in MS
  - `targetDevice` object, required: Target device
    - `name` string, required
    - `ram` integer
    - `rom` integer
  - `compiler` string[]
  - `precision` string[]
  - `trainingCycles` integer: Maximum number of training cycles
  - `tuningMaxTrials` integer: Maximum number of trials
  - `tuningWorkers` integer: Maximum number of parallel workers/jobs
  - `initialTrials` integer: Number of initial trials
  - `optimizationRounds` integer: Number of optimization rounds
  - `trialsPerOptimizationRound` integer: Number of trials per optimization round
  - `minMACCS` number
  - `maxMACCS` number
  - `tuningAlgorithm` 'random' | 'hyperband' | 'bayesian' | 'custom': Tuning algorithm to use to search hyperparameter space
  - `notificationOnCompletion` boolean
  - `importProjectMetrics` boolean: Whether to import metrics for previous EON tuner runs in the same project to accelerate the hyperparameter search process
  - `importResourceMetrics` boolean: Whether to import resource usage (RAM/ROM/latency) metrics to accelerate the hyperparameter search process
  - `numImportProjectMetrics` number: Number of project trials to import
  - `numImportResourceMetrics` number: Number of resource usage trials to import
  - `enableSEM` boolean: Enable standard error of the mean (SEM)
  - `accuracySEM` number: Standard error of the trial accuracy mean
  - `latencySEM` number: Standard error of the trial latency mean
  - `optimizationObjectives` object[]: Hyperparameter optimization objectives and corresponding weights
    - `objective` string, required: Objective to optimize
    - `label` string, required: Label of the objective
    - `weight` number, required: Weight of the objective
  - `rawObjectives` string: Hyperparameter optimization objectives + weights in string format
  - `optimizationPrecision` 'float32' | 'int8': Model variant to optimize for
  - `earlyStopping` boolean: Enable trial level early stopping based on loss metrics during training
  - `earlyStoppingWindowSize` number: Stops the EON tuner if the feasible (mean) objective has not improved over the past “window_size” iterations
  - `earlyStoppingImprovementBar` number: Threshold (in [0,1]) for considering relative improvement over the best point.
  - `MOMF` boolean: Enable Multi-fidelity Multi-Objective optimization
  - `verboseLogging` boolean: Enable verbose logging
  - `disableConstraints` boolean: Disable search constraints
  - `disableDeduplicate` boolean: Disable trial deduplication
  - `maxTotalTrainingTime` number: Maximum total training time in seconds
  - `tunerChildJobMemoryMiB` integer: Optional memory override for tuner child jobs (MiB), capped at 65536 MiB.
  - `tunerSpaceOptions` object
  - `space` TunerSpaceImpulse[]: List of impulses specifying the EON Tuner search space
    - `parameters` object: Hyperparameters with potential values that can be used in any block in this impulse
    - `inputBlocks` TunerSpaceInputBlock[], required: Input Blocks that are part of this impulse
    - `dspBlocks` TunerSpaceDSPBlock[], required: DSP Blocks that are part of this impulse
    - `learnBlocks` array[], required: Learning Blocks that are part of this impulse
      - TunerSpaceLearnBlock[]
  - `searchSpaceTemplate` object: Search space template
    - `identifier` 'speech_keyword' | 'speech_continuous' | 'audio_event' | 'audio_continuous' | 'visual' | 'motion_event' | 'motion_continuous' | 'audio_syntiant' | 'object_detection_bounding_boxes' | 'object_detection_centroids' | 'visual_ad' | 'object_detection_yolo_pro', required: Search space template identifier
    - `classification` boolean: Whether a classification block should be added to the search space
    - `anomaly` boolean: Whether an anomaly block should be added to the search space
    - `regression` boolean: Whether a regression block should be added to the search space
  - `searchSpaceSource` object: Search space source
    - `type` 'template' | 'run' | 'impulse' | 'custom', required: Search space source type
    - `templateTitle` string: Search space source template title
    - `runTitle` string: Search space source run title
    - `impulseTitle` string: Search space source impulse title

## Response `200`

OK

- GenericApiResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)

---

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