Web SDK
The Web SDK supports integration into new or existing web applications.
The Web SDK is not supported inside Android WebView. Supported alternatives include Chrome Custom Tabs, a full browser page, or the native Android SDK. Chrome Custom Tabs still require the same headers and permissions.
Before Web SDK integration, review
System requirements for browser and
header prerequisites, and
Web SDK troubleshooting for the most
common failure modes related to COOP/COEP, Safari/iOS, third-party scripts,
iframe embedding, and Android WebView.
The best way to get started is to run one of the example apps:
- See here for a minimal example using pure Javascript.
- See here for a minimal example using React and Vite.
- See here for a minimal example using Vue 3 and Vite.
- See here for a minimal example using Angular.
- See here for the source code of playground.shen.ai which uses Next.js + Typescript.
Installing the SDK package
The Web SDK is published to npm as @shenai/sdk.
npm install @shenai/sdkUse the equivalent command for your package manager if you use yarn, pnpm, or another npm-compatible client.
import CreateShenaiSDK from "@shenai/sdk"
const shenaiSDK = await CreateShenaiSDK()Further steps
Please see permissions, initialization, configuration and video measurement for further steps.