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

# API Keys

> Set up API keys for Anthropic, Google AI, ElevenLabs, and other integrations

During the onboarding flow in Bolly's web interface you'll choose one of two ways to connect to Claude. No need to edit config files — everything is set up in the browser.

## Option 1: Anthropic API Key

The standard approach — you provide your own API key and pay per usage.

<Steps>
  <Step title="Create an Anthropic account">
    Go to [console.anthropic.com](https://console.anthropic.com) and sign up.
  </Step>

  <Step title="Generate an API key">
    Navigate to **Settings > API Keys** and click **Create Key**. Give it a descriptive name like "Bolly".
  </Step>

  <Step title="Add credits">
    Anthropic requires prepaid credits. Add funds under **Settings > Billing**. Usage depends on how much you interact with Bolly — typical usage is \$5-20/month.
  </Step>

  <Step title="Enter the key in Bolly">
    Open Bolly in your browser at [http://localhost:26559](http://localhost:26559). The onboarding flow will prompt you for your API key.
  </Step>
</Steps>

<Warning>Keep your API key secret. Never share it or commit it to version control. Bolly stores it locally on your machine.</Warning>

### Pricing considerations

Bolly uses Claude for all conversations, reasoning, and tool use. Costs depend on:

* **Conversation length** — longer chats use more tokens
* **Tool usage** — each tool call involves additional API calls
* **Heartbeat cycles** — autonomous wake-ups consume tokens
* **Memory operations** — search and retrieval use the API

<Tip>Start with \$10-20 in credits and monitor usage through the [Anthropic dashboard](https://console.anthropic.com/settings/billing).</Tip>

## Option 2: Claude Pro / Max Subscription

If you have an active **Claude Pro** or **Claude Max** subscription, you can use it instead of an API key. Under the hood Bolly emulates Claude Code, which is included in Pro and Max plans.

<Steps>
  <Step title="Select subscription mode in onboarding">
    When Bolly asks how you'd like to connect, choose **Claude Subscription**.
  </Step>

  <Step title="Log in to your Claude account">
    Follow the authentication flow to link your Pro or Max subscription.
  </Step>
</Steps>

<Warning>
  Using a subscription is **at your own risk**. In theory everything should work fine since Bolly emulates the Claude Code interface, but this is not an officially supported use case by Anthropic. Your account is subject to Anthropic's terms of service.
</Warning>

## Optional: Google AI

Google AI provides two features for Bolly:

1. **Vector embeddings** for semantic memory search (beyond keyword-based BM25)
2. **Video and audio analysis** for understanding media files

<Steps>
  <Step title="Get a Google AI API key">
    Go to [aistudio.google.com](https://aistudio.google.com) and sign in with your Google account. Click **Get API key** in the sidebar.
  </Step>

  <Step title="Create or select a project">
    Choose an existing Google Cloud project or create a new one.
  </Step>

  <Step title="Add the key in Bolly">
    Open Bolly's settings in the web interface and add your Google AI key.
  </Step>
</Steps>

### What changes with Google AI enabled

| Feature        | Without Google AI    | With Google AI                |
| -------------- | -------------------- | ----------------------------- |
| Memory search  | BM25 (keyword-based) | BM25 + vector similarity      |
| Search quality | Good for exact terms | Better for conceptual queries |
| Media analysis | Not available        | Video and audio understanding |

<Info>Google AI's free tier is generous. Most Bolly users won't exceed the free quota for embeddings.</Info>

## Optional: ElevenLabs

ElevenLabs enables Bolly to speak with a synthesized voice using text-to-speech.

<Steps>
  <Step title="Create an ElevenLabs account">
    Go to [elevenlabs.io](https://elevenlabs.io) and sign up.
  </Step>

  <Step title="Get your API key">
    Navigate to your profile settings and copy your API key.
  </Step>

  <Step title="Add the key in Bolly">
    Open Bolly's settings in the web interface and add your ElevenLabs key.
  </Step>
</Steps>

<Note>ElevenLabs offers a free tier with limited characters per month. Paid plans start at \$5/month for more usage.</Note>

## Security best practices

* **Never share your API keys** — they grant full access to your accounts
* **Rotate keys periodically** — regenerate keys every few months
* **Monitor usage** — check provider dashboards for unexpected spikes
* **Use separate keys for Bolly** — don't reuse keys from other projects

## Verifying your keys

After entering your keys through the Bolly UI, check the logs to confirm successful connection:

<CodeGroup>
  ```bash Linux theme={null}
  journalctl -u bolly -n 20
  ```

  ```bash macOS theme={null}
  tail -20 ~/Library/Logs/bolly.log
  ```

  ```bash Docker theme={null}
  docker logs bolly --tail 20
  ```
</CodeGroup>

Look for messages confirming successful API connection. If a key is invalid, Bolly will show an error in the web interface.

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/docs/installation/configuration">
    Customize personality, heartbeat, and other settings.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/docs/installation/troubleshooting">
    Fix common API key and connection issues.
  </Card>
</CardGroup>
