---
title: "Add transfer learning block"
method: POST
path: "/api/organizations/{organizationId}/transfer-learning"
tags: ["OrganizationBlocks"]
---

# Add transfer learning block

`POST /api/organizations/{organizationId}/transfer-learning`

## Request

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

Adds a transfer learning block.

## Path parameters

- `organizationId` integer, required

## Request body

- AddOrganizationTransferLearningBlockRequest
  - `name` string, required
  - `dockerContainer` string, required
  - `description` string, required
  - `operatesOn` 'object_detection' | 'audio' | 'image' | 'regression' | 'anomaly_detection' | 'visual_anomaly_detection' | 'other' | 'image_akida' | 'object_detection_akida' | 'classification_akida' | 'self_contained_freeform_output', required
  - `objectDetectionLastLayer` 'mobilenet-ssd' | 'fomo' | 'yolov2-akida' | 'yolov5' | 'yolov5v5-drpai' | 'yolox' | 'yolov7' | 'yolo-pro' | 'tao-retinanet' | 'tao-ssd' | 'tao-yolov3' | 'tao-yolov4' | 'yolov11' | 'yolov11-abs' | 'paddleocr-detector' | 'qc-face-det-lite' | 'qc-yolox'
  - `implementationVersion` integer, required
  - `isPublic` boolean: Whether this block is publicly available to Edge Impulse users (if false, then only for members of the owning organization)
  - `isPublicForDevices` string[]: If `isPublic` is true, the list of devices (from latencyDevices) for which this model can be shown.
  - `publicProjectTierAvailability` 'enterprise-only' | 'all-projects' | 'all-projects-including-whitelabels': For public blocks, this indicates the project tiers for which this block is available.
  - `repositoryUrl` string: URL to the source code of this custom learn block.
  - `customBlockRef` string: Unique stable string key used to create and find this custom block.
  - `parameters` object[]: List of parameters, spec'ed according to https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
  - `imageInputScaling` '0..1' | '-1..1' | '-128..127' | '0..255' | 'torch' | 'bgr-subtract-imagenet-mean': Normalization that is applied to images. If this is not set then 0..1 is used. "0..1" gives you non-normalized pixels between 0 and 1. "-1..1" gives you non-normalized pixels between -1 and 1. "0..255" gives you non-normalized pixels between 0 and 255. "-128..127" gives you non-normalized pixels between -128 and 127. "torch" first scales pixels between 0 and 1, then applies normalization using the ImageNet dataset (same as `torchvision.transforms.Normalize()`). "bgr-subtract-imagenet-mean" scales to 0..255, reorders pixels to BGR, and subtracts the ImageNet mean from each channel.
  - `indRequiresGpu` boolean: If set, requires this block to be scheduled on GPU.
  - `customModelVariants` OrganizationTransferLearningBlockCustomVariant[]: List of custom model variants produced when this block is trained. This is experimental and may change in the future.
    - `key` string, required: Unique identifier or key for this custom variant
    - `name` string, required: Custom variant display name
    - `inferencingEntrypoint` string, required: The entrypoint command to run custom inferencing for this model variant, via the learn block container
    - `profilingEntrypoint` string: The entrypoint command to run custom profiling for this model variant, via the learn block container
    - `modelFiles` OrganizationTransferLearningBlockModelFile[]
      - `id` string, required: Output artifact unique file ID, in kebab case
      - `name` string, required: Output artifact file name
      - `type` 'binary' | 'json' | 'text', required: Output artifact file type
      - `description` string, required: Output artifact file description
  - `displayCategory` 'classical' | 'tao' | 'developer-preview': Category to display this block in the UI.
  - `indBlockNoLongerAvailable` boolean: If set, then this block is no longer available for training; and blockNoLongerAvailableReason should be set.
  - `blockNoLongerAvailableReason` string: In Markdown format. Should be set if `indBlockNoLongerAvailable` is true, contains migration information for existing users of this block.
  - `sourceCodeDownloadStaffOnly` boolean: Whether the source code is only available for staff users.

## Response `200`

OK

- EntityCreatedResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `id` integer, required: Unique identifier of the created entity.

---

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