<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLKey",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:objc(cs)MLKey"
  },
  "title" : "MLKey"
}
-->

# MLKey

An abstract base class for machine learning key types.

```
class MLKey
```

## Overview

You don’t create use this class directly. Instead, use a class that inherits from this one, such as [`MLParameterKey`](/documentation/CoreML/MLParameterKey) or [`MLMetricKey`](/documentation/CoreML/MLMetricKey).

## Topics

### Retrieving a key’s information

[`name`](/documentation/CoreML/MLKey/name)

The name of the machine learning key.

[`scope`](/documentation/CoreML/MLKey/scope)

The applicable scope of the machine learning key.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)