> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiddenlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prerequisites

> Check the runtime, build tools, account access, credentials, and network access you need before you install a HiddenLayer SDK for Python, TypeScript, or Java.

Before you install a HiddenLayer SDK, make sure you have the items on this page. Checking them first saves time, because most setup problems come from an unsupported runtime version, missing API permissions, or a blocked network connection.

## Checklist

| Requirement | Why you need it |
| - | - |
| A supported runtime: Python 3.10 or later, Node.js 22 or later, or Java 8 or later | Each SDK requires a minimum runtime version. |
| A package manager or build tool: `pip`, `npm`, or Gradle or Maven | Installs the SDK and its dependencies. |
| A HiddenLayer account with Console access | You create client credentials in the Console. |
| A client credential (client ID and client secret) | The SDK uses these to authenticate every request. |
| Your region or base URL | Credentials and API hosts are region specific. |
| HTTPS access to the HiddenLayer API host | The SDK sends all requests over the network. |
| Optional packages for some workflows | Some helpers need third-party libraries, such as an AWS SDK. |

## Runtime and build tools

Check the runtime and tools for the language you use.

> [tab] Python
>
> The Python SDK supports Python 3.10 and later, and is tested on Python 3.10 through 3.14. On Python 3.9, `pip` installs version 3.10.0, the last release that supports it, so the examples in this guide do not apply.
>
> Check your Python version:
>
> > [tab] macOS/Linux
> >
> > ```bash theme={null}
> > python3 --version
> > ```
>
> > [tab] Windows
> >
> > ```powershell theme={null}
> > py --version
> > ```
> >
> > If the `py` launcher is not installed, run `python --version` instead.
>
> The output should be `Python 3.10` or later, for example `Python 3.12.4`. If your version is older, install a newer Python from [python.org](https://www.python.org/downloads/) or your operating system's package manager.
>
> You also need `pip`, the Python package installer, and `venv`, the built-in module that creates virtual environments. A virtual environment is a self-contained folder with its own Python interpreter and packages, so the SDK's dependencies do not conflict with other projects on your machine. Check that both are available:
>
> > [tab] macOS/Linux
> >
> > ```bash theme={null}
> > python3 -m pip --version
> > python3 -m venv --help
> > ```
>
> > [tab] Windows
> >
> > ```powershell theme={null}
> > py -m pip --version
> > py -m venv --help
> > ```
>
> > [!TIP]
> >
> > On some Linux distributions, `venv` is packaged separately from Python. If `python3 -m venv --help` fails, install your distribution's venv package (for example, `python3-venv` on Debian and Ubuntu).

> [tab] TypeScript
>
> The TypeScript SDK runs on Node.js 22 or later and supports TypeScript 4.9 or later. It ships both CommonJS and ES module builds. It is a server-side library: run it in Node.js, not in a browser, so that your credentials stay on the server.
>
> Check your Node.js and npm versions:
>
> ```bash theme={null}
> node --version
> npm --version
> ```
>
> The Node.js output should be `v22.0.0` or later, for example `v22.18.0`. If your version is older, install a current release from [nodejs.org](https://nodejs.org/) or with a version manager such as `nvm`. Node.js 20 reached end of life on April 30, 2026, and the current SDK does not support it.
>
> You can use another package manager, such as pnpm or Yarn, instead of npm.

> [tab] Java
>
> The Java SDK runs on Java 8 or later. You also need a build tool that downloads dependencies from Maven Central, such as Gradle or Maven.
>
> Check your Java version and build tool:
>
> ```bash theme={null}
> java -version
> gradle --version   # or: mvn --version
> ```
>
> The Java output should be version `1.8` (Java 8) or later, for example `openjdk version "21.0.5"`. If your version is older, install a current JDK, such as [Eclipse Temurin](https://adoptium.net/).
>
> The SDK depends on OkHttp 5 and Jackson 2.18, which your build tool downloads with it. If your project already uses older versions of these libraries, check them for conflicts before you install. See [Installation](https://docs.hiddenlayer.ai/docs/integrations/sdk/installation.md#common-installation-errors).

## HiddenLayer account and client credential

You need a HiddenLayer account with access to the HiddenLayer Console. In the Console, create a client credential. A client credential consists of a **client ID** and a **client secret**. The SDK exchanges these for a short-lived access token using OAuth2 client credentials, a standard flow in which an application authenticates as itself rather than as a user.

Follow [Create a Client Credential](https://docs.hiddenlayer.ai/docs/products/console/apikey_aisec_platform.md#create-a-client-credential) to create one. When you create the client credential:

* Select the **Read**, **Write**, and **Delete** permissions needed for each product you plan to use. For example, AI Runtime Security needs Interactions (Read, Write). See [Permissions for Products and Features](https://docs.hiddenlayer.ai/docs/products/console/apikey_aisec_platform.md#permissions-for-products-and-features) for the full list. Follow the principle of least privilege and grant only what your code needs. If the client credential lacks a permission, the API responds with HTTP 403, which each SDK reports as a `ForbiddenError`.
* Copy the client secret and store it securely. Treat it like a password.

The SDKs also accept an API key, which they send as a bearer token. Client credentials are recommended. See [Authentication and configuration](https://docs.hiddenlayer.ai/docs/integrations/sdk/authentication.md#authentication-methods).

> [!WARNING]
>
> Never paste your client secret into source code, notebooks, or commits. The SDKs read credentials from environment variables. See [Authentication and configuration](https://docs.hiddenlayer.ai/docs/integrations/sdk/authentication.md).

## Region or base URL

HiddenLayer runs separate regional environments. Your client credential works only in the region where it was created, because the SDK requests tokens from the same host it sends API calls to.

| Environment | API host |
| - | - |
| `prod-us` (default) | `https://api.us.hiddenlayer.ai` |
| `prod-eu` | `https://api.eu.hiddenlayer.ai` |

If you use a self-hosted deployment or a locally running AI Runtime Security container, you need its base URL instead, for example `http://localhost:8000`. Ask your administrator if you are not sure which applies to you.

## Network access

The machine that runs your code must be able to reach the API host for your region over HTTPS (port 443). If your organization routes traffic through a proxy or firewall, confirm that the host is allowed. You can configure a proxy for the SDK. See [Authentication and configuration](https://docs.hiddenlayer.ai/docs/integrations/sdk/authentication.md#use-a-proxy).

Some workflows also need network access to other services:

* Hugging Face model scans download files from Hugging Face.
* S3 and Azure Blob Storage model scans download files from your cloud storage.
* Model scans upload files to HiddenLayer through presigned storage URLs.
* Red team sessions send attack prompts to your target AI application, which your code calls.

## Optional packages by workflow

Each SDK installs everything needed for most API calls. A few helpers rely on third-party packages that you install separately, only if you use that helper.

> [tab] Python
>
> | Workflow | Helper | Extra packages |
> | - | - | - |
> | Scan local files or folders | `client.model_scanner.scan_file`, `scan_folder` | None |
> | Scan a remote model without downloading it | `client.community_scanner.community_scan` | None |
> | Scan a Hugging Face model by downloading it first | `client.model_scanner.scan_huggingface_model` | `huggingface_hub` |
> | Scan a model in AWS S3 | `client.model_scanner.scan_s3_model` | `boto3` |
> | Scan a model in Azure Blob Storage | `client.model_scanner.scan_azure_blob_model` | `azure-identity`, `azure-storage-blob` |
> | Send the async client's requests with aiohttp | `AsyncHiddenLayer` | `hiddenlayer-sdk[aiohttp]` extra |
> | Load credentials from a `.env` file | `load_dotenv()` | `python-dotenv` |

> [tab] TypeScript
>
> | Workflow | Helper | Extra packages |
> | - | - | - |
> | Scan local files or folders | `client.modelScanner.scanFile`, `scanFolder` | None |
> | Scan a remote model without downloading it | `client.communityScanner.communityScan` | None |
> | Scan a Hugging Face model by downloading it first | `client.modelScanner.scanHuggingFaceModel` | `@huggingface/hub` |
> | Scan a model in AWS S3 | `client.modelScanner.scanS3Model` | `@aws-sdk/client-s3` |
> | Scan a model in Azure Blob Storage | `client.modelScanner.scanAzureBlobModel` | `@azure/storage-blob`, plus `@azure/identity` to authenticate with Microsoft Entra ID |
> | Send requests through a proxy | `fetch` client option | `undici` |
> | Load credentials from a `.env` file | Node.js `--env-file` option | None |

> [tab] Java
>
> | Workflow | Helper | Extra packages |
> | - | - | - |
> | Scan local files or folders | `client.modelScanner().scanFile`, `scanFolder` | None |
> | Scan a remote model without downloading it | `client.communityScanner().communityScan` | None |
> | Scan a model in Hugging Face, AWS S3, or Azure Blob Storage | None. Download the model with your provider's SDK, then scan the local copy. | Your provider's Java SDK |

Installation commands for these packages are on the [Installation](https://docs.hiddenlayer.ai/docs/integrations/sdk/installation.md#install-optional-packages) page.

## Next step

> [card] [Install the SDK](https://docs.hiddenlayer.ai/docs/integrations/sdk/installation.md)
>
> Add the HiddenLayer SDK to your project.
