Polaris Installation

System requirements:

  • Node.js 18 or later
  • macOS, Windows (including WSL), and Linux are supported.

Install the SDK:

Terminal
npm i -S @getpolaris.ai/sdk @getpolaris.ai/sdk-angular

Configure the SDK

To configure the SDK, you will need your app’s API Key. You can find the API Key by going to your app in Polaris and clicking on Settings.

React
import { providePolaris } from '@getpolaris.ai/sdk-angular';

bootstrapApplication(AppComponent, {
  providers: [
    providePolaris({
      apiKey: API_KEY,
    }),
  ],
});

If you're using Angular modules in your application, you can configure the SDK with the PolarisModule.

React
import { PolarisModule } from '@getpolaris.ai/sdk-angular';

@NgModule({
  imports: [
    PolarisModule.forRoot({
      apiKey: API_KEY,
    }),
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}