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

# Installation

> Install the Averta SDK package for your provider and runtime.

## Requirements

* Node.js 18 or newer for JavaScript and TypeScript wrappers
* Python 3.10 or newer for Python wrappers
* An Averta API key
* A policy attached to that Averta API key
* Network access to `https://api.averta.io`
* The native provider SDK for the provider you already use

## Packages

| Package                          | Use it when                                                                   |
| -------------------------------- | ----------------------------------------------------------------------------- |
| `@averta-security/sdk-openai`    | Your agent uses the OpenAI JavaScript SDK.                                    |
| `@averta-security/sdk-anthropic` | Your agent uses the Anthropic JavaScript SDK.                                 |
| `@averta-security/sdk-core`      | You are building a custom adapter or unsupported provider integration.        |
| `averta-openai`                  | Your agent uses the OpenAI Python SDK. Source beta; not on PyPI yet.          |
| `averta-core`                    | You are building Python custom adapter helpers. Source beta; not on PyPI yet. |

Most applications should install a provider adapter, not `sdk-core` or `averta-core` directly. Use [custom integrations](/custom/overview) or the [raw API](/custom/raw-api) when no provider wrapper fits.

## OpenAI

<CodeGroup>
  ```bash npm theme={null}
  npm install openai @averta-security/sdk-openai
  ```

  ```bash yarn theme={null}
  yarn add openai @averta-security/sdk-openai
  ```

  ```bash pnpm theme={null}
  pnpm add openai @averta-security/sdk-openai
  ```

  ```bash Python source theme={null}
  python3 -m venv .venv
  . .venv/bin/activate
  python3 -m pip install "openai>=2" -e packages/python-core -e packages/python-openai
  ```
</CodeGroup>

<Warning>
  The Python packages are implemented in the SDK repository, but `averta-openai` and `averta-core` are not published to PyPI yet. Run the source install from the SDK repository until the PyPI release exists.
</Warning>

Python V1 requires Python 3.10 or newer, `openai>=2`, and a sync `OpenAI` client. It supports `responses.create(...)`, `responses.create(stream=True, ...)`, `responses.stream(...)`, `chat.completions.create(...)`, and `chat.completions.create(stream=True, ...)`.

## Anthropic JavaScript

<CodeGroup>
  ```bash npm theme={null}
  npm install @anthropic-ai/sdk @averta-security/sdk-anthropic
  ```

  ```bash yarn theme={null}
  yarn add @anthropic-ai/sdk @averta-security/sdk-anthropic
  ```

  ```bash pnpm theme={null}
  pnpm add @anthropic-ai/sdk @averta-security/sdk-anthropic
  ```
</CodeGroup>

## Custom Adapters

<CodeGroup>
  ```bash npm theme={null}
  npm install @averta-security/sdk-core
  ```

  ```bash Python source theme={null}
  python3 -m pip install -e packages/python-core
  ```
</CodeGroup>

Use core packages only when you need to call the decision API yourself or build a provider adapter. If your runtime is not JavaScript or Python, use the [raw API integration path](/custom/raw-api).

## Environment Variables

Set the provider key your agent already uses plus `AVERTA_API_KEY`. The Averta key must have a [policy attached](/dashboard/api-keys#policy-attachment).

```bash theme={null}
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
export AVERTA_API_KEY="your-averta-key"
```

Provider wrappers read `AVERTA_API_KEY` automatically. Use the explicit key option only when a wrapped client should ignore the process environment.

If you are using a non-production Averta environment, you can also set:

```bash theme={null}
export AVERTA_BASE_URL="https://your-averta-host"
```

## What to read next

<CardGroup cols={2}>
  <Card title="OpenAI quickstart" icon="wand-magic-sparkles" href="/openai/quickstart">
    Wrap an existing OpenAI client.
  </Card>

  <Card title="Anthropic quickstart" icon="sparkles" href="/anthropic/quickstart">
    Wrap an existing Anthropic client.
  </Card>

  <Card title="Custom integrations" icon="code" href="/custom/overview">
    Build an adapter on top of `sdk-core`.
  </Card>

  <Card title="Raw API" icon="braces" href="/custom/raw-api">
    Call Averta directly from any language.
  </Card>

  <Card title="Choose an integration" icon="route" href="/choose-integration">
    Compare the supported paths.
  </Card>
</CardGroup>
