# TypeScript (/docs/typescript)



`@tawaguard/sdk` is the official TypeScript/JavaScript client for Tawa Guard —
a fully-typed client, a live event stream, and Vercel AI SDK middleware.

<ComponentVersion component="sdk-ts" />

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

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

if (result.action !== "allow") {
  // don't forward this prompt to your model
}
```

<Cards>
  <Card title="Quickstart" href="/docs/typescript/getting-started/quickstart" description="Scan your first prompt in a couple of minutes." />

  <Card title="Guides" href="/docs/typescript/guides" description="Authentication, identifiers, policy rules, and error handling." />

  <Card title="Integrations" href="/docs/typescript/integrations" description="Vercel AI SDK middleware." />

  <Card title="Cookbook" href="/docs/typescript/cookbook" description="Complete recipes for RAG, agents, and raw OpenAI." />

  <Card title="SDK Reference" href="/docs/typescript/sdk" description="Every scan method and client option, fully typed." />
</Cards>
