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

# Quickstart

> Get started with Continum in 5 minutes

## Interactive Setup (Recommended)

The fastest way to get started is with our interactive CLI:

```bash theme={null}
npx continum init
```

This will:

* Detect your existing framework (Next.js, Fastify, etc.) or help you set one up
* Guide you through configuration (product type, providers, compliance frameworks)
* Install the SDK automatically
* Generate config files and example code
* Set up real-time alerts (Slack, PagerDuty, Discord, Webhooks)

<Note>
  **Starting from scratch?** Run `npx continum init` in an empty folder and it will help you set up a complete project with your chosen framework and Continum built-in!
</Note>

## Manual Setup

### 1. Get your API key

Get your API key from the [dashboard](https://app.continum.co):

1. Sign in with GitHub
2. Create a customer account (Individual or Company)
3. Generate an API key
4. Save it securely (you won't see it again)

### 2. Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install @continum/sdk
  ```

  ```bash yarn theme={null}
  yarn add @continum/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @continum/sdk
  ```
</CodeGroup>

### 3. Basic usage

Wrap any LLM call with `protect()`:

<CodeGroup>
  ```typescript OpenAI theme={null}
  import { protect } from '@continum/sdk';
  import OpenAI from 'openai';

  const openai = new OpenAI();

  const response = await protect(
    () => openai.chat.completions.create({
      model: 'gpt-4',
      messages: [
        { role: 'system', content: 'You are a helpful assistant.' },
        { role: 'user', content: 'What is the capital of France?' }
      ]
    }),
    {
      apiKey: process.env.CONTINUM_API_KEY!
    },
    {
      preset: 'customer-support',
      comply: ['GDPR', 'SOC2']
    }
  );

  console.log(response.choices[0].message.content);
  ```

  ```typescript Anthropic theme={null}
  import { protect } from '@continum/sdk';
  import Anthropic from '@anthropic-ai/sdk';

  const anthropic = new Anthropic();

  const response = await protect(
    () => anthropic.messages.create({
      model: 'claude-3-5-sonnet-20241022',
      max_tokens: 1024,
      messages: [
        { role: 'user', content: 'What is the capital of France?' }
      ]
    }),
    {
      apiKey: process.env.CONTINUM_API_KEY!
    },
    {
      preset: 'customer-support',
      comply: ['GDPR', 'SOC2']
    }
  );

  console.log(response.content[0].text);
  ```

  ```typescript Google Gemini theme={null}
  import { protect } from '@continum/sdk';
  import { GoogleGenerativeAI } from '@google/generative-ai';

  const genai = new GoogleGenerativeAI(process.env.GOOGLE_API_KEY!);
  const model = genai.getGenerativeModel({ model: 'gemini-2.5-pro' });

  const response = await protect(
    () => model.generateContent('What is the capital of France?'),
    {
      apiKey: process.env.CONTINUM_API_KEY!
    },
    {
      preset: 'customer-support',
      comply: ['GDPR', 'SOC2']
    }
  );

  console.log(response.response.text());
  ```
</CodeGroup>

### 4. Global configuration (recommended)

For production, configure once and use everywhere:

```typescript theme={null}
import { continum } from '@continum/sdk';

continum.configure({
  apiKey: process.env.CONTINUM_API_KEY!,
  preset: 'customer-support',
  comply: ['GDPR', 'SOC2'],
  alerts: {
    slack: process.env.SLACK_WEBHOOK_URL,
    pagerduty: process.env.PAGERDUTY_KEY
  }
});

// Now use protect() without passing config every time
const response = await continum.protect(
  () => openai.chat.completions.create({...})
);
```

## What happens next?

1. **Instant response**: Your user gets the LLM response immediately (0ms added latency)
2. **Async audit**: The interaction is audited for compliance violations
3. **Real-time alerts**: Violations trigger alerts to your configured channels
4. **Signal stored**: Results appear in your dashboard within seconds

## Presets & Compliance Frameworks

Continum uses **presets** to automatically configure the right detection types for your use case:

```typescript theme={null}
// Customer support bot
{ preset: 'customer-support' }  // → PII, content policy, bias

// Financial services
{ preset: 'fintech-ai', comply: ['FINRA', 'SOC2'] }  // → PII, financial compliance, security

// Healthcare application
{ preset: 'healthcare-ai', comply: ['HIPAA'] }  // → PII, content policy, bias, hallucination

// AI agent with tool use
{ preset: 'agent' }  // → Agent safety, prompt injection, data exfiltration
```

**Available presets:**

* `customer-support`, `legal-ai`, `fintech-ai`, `healthcare-ai`
* `coding-assistant`, `agent`, `content-generation`
* `internal-tool`, `data-pipeline`, `education-ai`

**Supported compliance frameworks:**

* `GDPR`, `CCPA`, `HIPAA`, `SOC2`, `ISO_27001`
* `EU_AI_ACT`, `FINRA`, `PCI_DSS`, `NIST_AI_RMF`

## Real-time Alerts

Get notified instantly when violations are detected:

```typescript theme={null}
continum.configure({
  apiKey: process.env.CONTINUM_API_KEY!,
  preset: 'customer-support',
  alerts: {
    slack: process.env.SLACK_WEBHOOK_URL,      // HIGH/CRITICAL violations
    pagerduty: process.env.PAGERDUTY_KEY,      // CRITICAL violations only
    discord: process.env.DISCORD_WEBHOOK_URL,  // MEDIUM/LOW violations
    webhook: process.env.CUSTOM_WEBHOOK_URL    // All violations
  }
});
```

Alerts are automatically routed by risk level without any dashboard configuration needed.

## Blocking Mode

For high-risk scenarios, use blocking mode to wait for audit results:

```typescript theme={null}
import { protect, ContinumBlockedError } from '@continum/sdk';

try {
  const response = await protect(
    () => openai.chat.completions.create({...}),
    {
      apiKey: process.env.CONTINUM_API_KEY!,
      blockOn: 'HIGH'  // Block if risk level is HIGH or CRITICAL
    }
  );
} catch (error) {
  if (error instanceof ContinumBlockedError) {
    console.log('Blocked:', error.signal.violations);
    console.log('Risk level:', error.signal.riskLevel);
    // Handle blocked request
  }
}
```

## View your signals

Navigate to your [dashboard](https://app.continum.co/dashboard) to see compliance signals:

* Risk level breakdown (LOW, MEDIUM, HIGH, CRITICAL)
* Violation types and reasoning
* Filter by provider, model, date range
* Export for compliance reports

## Next steps

<CardGroup cols={2}>
  <Card title="Configure SDK" icon="gear" href="/sdk/configuration">
    Learn about advanced SDK configuration options
  </Card>

  <Card title="Interactive CLI" icon="terminal" href="/cli/continum-init">
    Use npx continum init for guided setup
  </Card>

  <Card title="Presets & Compliance" icon="shield-check" href="/sdk/presets">
    Explore presets and compliance frameworks
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    Explore the REST API endpoints
  </Card>
</CardGroup>

<Note>
  **Dev plan limits**: The DEV plan includes 1,000 audits per month. Upgrade to PRO for unlimited audits and advanced features.
</Note>
