# C API¶

The Habana Labs Management Library (HLML) is a C-based programmatic interface for monitoring and managing various states within Habana Labs AI accelerators. HLML can be used as a platform for building 3rd party applications and is also the underlying library used for the hl-smi tool (see System Management Interface Tool User Guide).

All APIs, structures and enums used are defined in the public header file. APIs that provide information about a specific device require a handle as a parameter. This handle can be retrieved using the device’s index or PCI address.

## Return Value¶

The return value of all the APIs is the following enum:

typedef enum hlml_return {

HLML_SUCCESS = 0,

HLML_ERROR_UNINITIALIZED = 1,

HLML_ERROR_INVALID_ARGUMENT = 2,

HLML_ERROR_NOT_SUPPORTED = 3,

HLML_ERROR_NOT_FOUND = 6,

HLML_ERROR_INSUFFICIENT_SIZE = 7,