Secured

Installation

Add @secured-ai/react and @secured-ai/core to a React app.

Install the React package alongside its peer dependencies:

npm install @secured-ai/react @secured-ai/core react

Required: SDK access token

@secured-ai/react uses the browser PrivacyClient from @secured-ai/core, so initialization requires an SDK access token created by a Pro user.

  1. Open Settings > SDK Access Tokens in the Secured platform.
  2. Create a token for your frontend environment.
  3. Add each allowed browser origin.
  4. Copy the raw token once.

See SDK Access Tokens for supported exact origins, wildcard subdomains, local development origins, rotation, and revoke behavior.

Peer dependencies

@secured-ai/react expects:

  • react@^18
  • @secured-ai/core

The React package does not replace the core package. It builds on top of it and re-exports the most commonly needed core types and utilities.

Browser-only runtime

The underlying PrivacyClient is browser-oriented. Create it in code that only runs in the browser, then pass it into SecuredProvider.

import { PrivacyClient } from '@secured-ai/core'

export const privacyClient = new PrivacyClient({
  baseUrl: 'https://dev-api.securedai.com',
  sdkAccessToken: import.meta.env.VITE_SECURED_SDK_ACCESS_TOKEN,
  engines: {
    regex: true,
    nlp: true,
    ml: false,
    gliner: false,
    custom: true,
  },
})

Choosing a package boundary

On this page