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

# Installing Vercel AI SDK

> Follow these steps to install the Vercel AI SDK with Observ

## Step 1: Get Your API Key

Create an account and get your API key from [Settings → API Keys](https://observ.dev/settings/api-keys).

## Step 2: Install Packages

Install the Observ SDK, Vercel AI SDK, and your chosen provider SDKs:

```bash theme={null}
npm install observ-sdk ai
```

Then install one or more provider SDKs:

<Tabs>
  <Tab title="OpenAI">
    ```bash theme={null}
    npm install @ai-sdk/openai
    ```

    Also works for **xAI** and **OpenRouter** (they use OpenAI-compatible APIs).
  </Tab>

  <Tab title="Anthropic">
    ```bash theme={null}
    npm install @ai-sdk/anthropic
    ```

    For **Claude** models including Sonnet 4.5 and Opus 4.
  </Tab>

  <Tab title="Google">
    ```bash theme={null}
    npm install @ai-sdk/google
    ```

    For **Gemini** models including Gemini 1.5 Pro.
  </Tab>

  <Tab title="Mistral">
    ```bash theme={null}
    npm install @ai-sdk/mistral
    ```

    For **Mistral** models including Mistral Large.
  </Tab>

  <Tab title="Cohere">
    ```bash theme={null}
    npm install @ai-sdk/cohere
    ```

    For **Cohere** models including Command R+.
  </Tab>
</Tabs>

## Complete Installation

Here's the complete installation for all providers:

```bash theme={null}
npm install observ-sdk ai

# Install providers (pick one or more)
npm install @ai-sdk/openai      # OpenAI, xAI, OpenRouter
npm install @ai-sdk/anthropic   # Anthropic (Claude)
npm install @ai-sdk/google      # Google (Gemini)
npm install @ai-sdk/mistral     # Mistral
npm install @ai-sdk/cohere      # Cohere
```

## Yarn / pnpm / Bun

<Tabs>
  <Tab title="yarn">
    ```bash theme={null}
    yarn add observ-sdk ai @ai-sdk/openai
    ```
  </Tab>

  {" "}

  <Tab title="pnpm">`bash pnpm add observ-sdk ai @ai-sdk/openai `</Tab>

  <Tab title="bun">
    ```bash theme={null}
    bun add observ-sdk ai @ai-sdk/openai
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="Usage Guide" icon="book" href="/vercel-ai/usage">
    Learn how to use the Vercel AI SDK with Observ
  </Card>

  <Card title="Overview" icon="zap" href="/vercel-ai/overview">
    Back to Vercel AI SDK overview
  </Card>
</CardGroup>
