Checklist
Runtime and build tools
Check the runtime and tools for the language you use.- Python
- TypeScript
- Java
The Python SDK supports Python 3.10 and later, and is tested on Python 3.10 through 3.14. On Python 3.9, The output should be
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:- macOS/Linux
- Windows
Python 3.10 or later, for example Python 3.12.4. If your version is older, install a newer Python from python.org 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:- macOS/Linux
- Windows
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 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 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.
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.
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. 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.- Python
- TypeScript
- Java
Next step
Install the SDK
Add the HiddenLayer SDK to your project.

