> ## Documentation Index
> Fetch the complete documentation index at: https://docs.complior.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Quick Start

> Add compliance protection to your LLM calls in 3 lines of code.

## Install

```bash theme={null}
npm install @complior/sdk
```

## Wrap your client

<Tabs>
  <Tab title="OpenAI">
    ```typescript theme={null}
    import { complior } from '@complior/sdk';
    import OpenAI from 'openai';

    const client = complior(new OpenAI());

    const response = await client.chat.completions.create({
      model: 'gpt-4',
      messages: [{ role: 'user', content: userInput }],
    });
    ```
  </Tab>

  <Tab title="Anthropic">
    ```typescript theme={null}
    import { complior } from '@complior/sdk';
    import Anthropic from '@anthropic-ai/sdk';

    const client = complior(new Anthropic());

    const response = await client.messages.create({
      model: 'claude-3-5-sonnet-20241022',
      messages: [{ role: 'user', content: userInput }],
    });
    ```
  </Tab>

  <Tab title="Vercel AI">
    ```typescript theme={null}
    import { complior } from '@complior/sdk';
    import { openai } from '@ai-sdk/openai';
    import { generateText } from 'ai';

    const client = complior(openai);

    const { text } = await generateText({
      model: client('gpt-4'),
      prompt: userInput,
    });
    ```
  </Tab>
</Tabs>

That's it. With zero configuration, the SDK applies default hooks: `prohibited` (138 patterns), `sanitize` (50+ PII types), `disclosure` (AI transparency message).

## Configure hooks

```typescript theme={null}
const client = complior(new OpenAI(), {
  hooks: ['prohibited', 'sanitize', 'disclosure', 'bias', 'escalation'],
  disclosure: {
    text: 'This response was generated by AI.',
    languages: ['en', 'de', 'fr', 'es'],
  },
});
```
