Initializing the Shen AI SDK
Initializing the Shen AI SDK
Installing the SDK makes the Shen AI libraries available in your project and prepares it to run. During initialization, your application authenticates using your SDK key, validates your license, and prepares the SDK for measurements. This step must be completed successfully before you can start a scan.
This guide explains what information is required, how the initialization process works, and how to verify that everything has been configured correctly.
Before you initialize the SDK
Before calling the initialization method, make sure you have:
- installed the correct SDK for your platform,
- created an SDK key in the Shen AI Platform,
- configured your development environment according to the system requirements,
- an active internet connection for license validation.
If you haven't completed these steps yet, refer to the previous onboarding articles before continuing.
Get your SDK key
Every Shen AI application is authenticated using an SDK key.
You can create and manage SDK keys in the Shen AI Platform under Licenses & SDK Keys. If you already created a key while setting up your account, you can use it here.
Treat your SDK key like any other application credential. Avoid hardcoding it in public repositories or exposing it in client-side code that isn't intended to be public.
Initialize the SDK
Once your SDK key is available, you're ready to initialize the SDK. The initialization process typically consists of three steps:
1. Load the SDK into your application.
2. Provide your SDK key.
3. Call the platform-specific initialization method.
Although the implementation differs slightly between platforms, the overall process is the same across all supported SDKs.
During initialization, the SDK validates your license and prepares the components required to perform measurements.
Detailed code examples for each platform are available in our documentation.
How to know the SDK is ready
Initialization is complete when the SDK reports that it has started successfully without returning an error. At this point, your application is ready to configure the measurement experience and start its first scan.
If initialization fails, the SDK returns an error that can help identify the cause.
Common initialization issues
Most initialization problems are caused by configuration rather than code. If the SDK doesn't initialize successfully, check that:
- you're using a valid and active SDK key,
- the SDK key belongs to the correct environment or project,
- the device has an internet connection so the license can be validated,
- you've installed the correct SDK package for your platform,
- your application meets the system requirements.
If the problem persists, review the platform-specific documentation.

