> For the complete documentation index, see [llms.txt](https://docs.recognito.vision/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.recognito.vision/face-liveness-detection-sdk/integration-guide/linux/api-reference.md).

# API Reference

### get\_version

{% code overflow="wrap" %}

```python
def get_version() -> str:
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="136"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>get_version</td></tr><tr><td><strong>Description</strong></td><td>Retrieves the SDK version information from a library.</td></tr><tr><td><strong>Input</strong></td><td>None</td></tr><tr><td><strong>Output</strong></td><td>The version string is returned as a standard Python string.</td></tr></tbody></table>

### get\_deviceid <a href="#get_device_id" id="get_device_id"></a>

{% code overflow="wrap" %}

```python
def get_deviceid() -> str:
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="136"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>get_deviceid</td></tr><tr><td><strong>Description</strong></td><td>Retrieves the Hardware ID from a library.</td></tr><tr><td><strong>Input</strong></td><td>None</td></tr><tr><td><strong>Output</strong></td><td>The Hardware ID is returned as a standard Python string.</td></tr></tbody></table>

### init\_sdk

{% code overflow="wrap" %}

```python
def init_sdk(dict_path: str, online_key: str) -> int:
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="137"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>init_sdk</td></tr><tr><td><strong>Description</strong></td><td>Initializes the SDK in online mode.</td></tr><tr><td><strong>Input</strong></td><td><ul><li><strong>dict_path</strong> (str): Path to the engine binary files directory</li><li><strong>online_key</strong> (str): Online key string </li></ul></td></tr><tr><td><strong>Output</strong></td><td><p>Status code indicating the result of the initialization.</p><ul><li>0: Success</li><li>Non-zero: Initialization failed</li></ul></td></tr></tbody></table>

### init\_sdk\_offline

{% code overflow="wrap" %}

```python
def init_sdk_offline(dict_path: str, offline_key_path: str) -> int:
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="137"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>init_sdk_offline</td></tr><tr><td><strong>Description</strong></td><td>Initializes the SDK in offline mode.</td></tr><tr><td><strong>Input</strong></td><td><ul><li><strong>dict_path</strong> (str): Path to the engine binary files directory</li><li><strong>offline_key</strong> (str): Path to the offline license key file</li></ul></td></tr><tr><td><strong>Output</strong></td><td><p>Status code indicating the result of the initialization.</p><ul><li>0: Success</li><li>Non-zero: Initialization failed</li></ul></td></tr></tbody></table>

### detect\_face\_rgb

{% code overflow="wrap" %}

```python
def detect_face_rgb(image: np.ndarray, width: int, height: int, face_bbox: np.ndarray, liveness_score: np.ndarray, angles: np.ndarray) -> int:
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="137"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>detect_face_rgb</td></tr><tr><td><strong>Description</strong></td><td>Detects and analyzes face.</td></tr><tr><td><strong>Input</strong></td><td><ul><li><strong>image</strong> (numpy.ndarray): Input image matrix</li><li><strong>width</strong> (int): Width of the input image</li><li><strong>height</strong> (int): Height of the input image</li><li><strong>face_bbox</strong> (numpy.ndarray): Face bounding box coordinates. Extracted face bbox will be stored</li><li><strong>liveness_score</strong> (numpy.ndarray): Liveness score of detected face</li><li><strong>angles</strong> (numpy.ndarray): Pitch, Yaw, Roll degree of detected face</li></ul></td></tr><tr><td><strong>Output</strong></td><td><p>Status code indicating the result of the liveness check.</p><ul><li>>0: Success</li><li>0: No Face</li><li>-1: SDK Activation Error</li><li>-2: SDK Initialization Error</li></ul></td></tr></tbody></table>

#### Liveness Score Values (Default Threshold is 0.5)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.recognito.vision/face-liveness-detection-sdk/integration-guide/linux/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
