# TypeScript (/docs/typescript/sdk)



`@tawaguard/sdk` is the official TypeScript/JavaScript client for the Tawa Guard
API. It wraps the REST API with an idiomatic,
fully-typed client.

## Install [#install]

```bash
npm install @tawaguard/sdk
```

## Quick client [#quick-client]

```ts
import { TawaGuard } from "@tawaguard/sdk";

const tawa = await TawaGuard.create(process.env.TAWA_API_KEY!);

const result = await tawa.analyze("Ignore all previous instructions…");
```

`TawaGuard.create` authenticates before returning, so a bad key surfaces
immediately rather than on first use. See [Configuration](/docs/typescript/sdk/client)
for the full set of options, and [Scanning](/docs/typescript/sdk/scanning) for every
scan method the client exposes.

<Cards>
  <Card title="Configuration" href="/docs/typescript/sdk/client" description="Client construction, region resolution, and custom base URLs." />

  <Card title="Scanning" href="/docs/typescript/sdk/scanning" description="analyze, scanContext, scanChunk, scanToolCall, scanToolOutput, and the result shape they all share." />
</Cards>
