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

# AI Provider Setup

> Connect your OpenAI or Anthropic API key and choose the right model

ReplyBubble uses **Bring Your Own Key (BYOK)** — you connect your own AI account and pay your provider directly. ReplyBubble charges a flat platform fee and never marks up AI costs.

> **Time estimate:** \~5 minutes

***

## What is BYOK?

Most chatbot platforms bundle AI costs into their pricing and charge you per message or per conversation. ReplyBubble works differently:

1. You create an account with an AI provider (OpenAI or Anthropic)
2. You generate an API key and paste it into ReplyBubble
3. When a visitor asks a question, ReplyBubble sends it to your AI provider and returns the answer
4. The AI provider bills you directly at their standard rates

**Why this matters:** You get full transparency into AI costs, no markup, and the freedom to switch providers or models at any time.

***

## Setting up OpenAI (recommended)

OpenAI is the most popular choice. Their GPT-4o-mini model offers a great balance of quality and cost for most use cases.

### Get your API key

1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
2. Sign in or create an account
3. Click **Create new secret key**
4. Name it "ReplyBubble" (helps you identify it later)
5. Click **Create secret key**
6. Copy the key immediately — it starts with `sk-proj-` and won't be shown again

> **Important:** Add billing to your OpenAI account at [platform.openai.com/account/billing](https://platform.openai.com/account/billing). Without billing, API calls will fail.

### Connect to ReplyBubble

1. In your ReplyBubble dashboard, go to **Settings > AI Provider**
2. Select **OpenAI**
3. Paste your API key
4. Click **Save**

***

## Setting up Anthropic

Anthropic makes the Claude family of models, which are known for careful, nuanced responses.

### Get your API key

1. Go to [console.anthropic.com](https://console.anthropic.com)
2. Sign in or create an account
3. Go to **API Keys**
4. Click **Create Key**
5. Name it "ReplyBubble"
6. Copy the key — it starts with `sk-ant-`

### Connect to ReplyBubble

1. In your ReplyBubble dashboard, go to **Settings > AI Provider**
2. Select **Anthropic**
3. Paste your API key
4. Click **Save**

***

## Choosing a model

After connecting your provider, select which AI model to use. Here's a simple comparison:

### OpenAI models

| Model           | Best for                        | Speed  | Quality   | Relative cost |
| --------------- | ------------------------------- | ------ | --------- | ------------- |
| **GPT-4o-mini** | Most use cases                  | Fast   | Great     | Low           |
| **GPT-4o**      | Complex topics, nuanced answers | Medium | Excellent | Higher        |

### Anthropic models

| Model                 | Best for                          | Speed  | Quality   | Relative cost |
| --------------------- | --------------------------------- | ------ | --------- | ------------- |
| **Claude Sonnet 4.5** | General use, thoughtful responses | Medium | Excellent | Medium        |
| **Claude Haiku 4.5**  | Speed-sensitive, simple Q\&A      | Fast   | Good      | Low           |

> **Note:** Anthropic updates model versions regularly. Your ReplyBubble dashboard shows the specific models available — pick from there.

**Recommendation:** Start with **GPT-4o Mini** (OpenAI) or **Claude Haiku 4.5** (Anthropic) — these are the defaults. They handle most support and sales conversations well at the lowest cost. Upgrade to a more capable model if you find answers need more depth.

***

## Understanding AI costs

AI providers charge per token (roughly 1 token = 0.75 words). A typical chatbot conversation uses 500–2,000 tokens.

### Realistic cost estimates

| Monthly conversations | Model       | Estimated AI cost |
| --------------------- | ----------- | ----------------- |
| 100                   | GPT-4o-mini | \$0.50–2          |
| 500                   | GPT-4o-mini | \$3–8             |
| 1,000                 | GPT-4o-mini | \$5–15            |
| 500                   | GPT-4o      | \$10–25           |

These are estimates. Actual costs depend on conversation length and complexity.

### How ReplyBubble keeps costs low

ReplyBubble automatically reduces your AI spend in several ways:

* **Response caching** — repeat questions get instant answers without calling the AI
* **Spam filtering** — spam and unserious messages are blocked before using any AI credits
* **Efficient knowledge base search** — only relevant content is sent to the AI, not your entire knowledge base
* **Offline mode** — when the AI is unavailable, visitors get pre-written answer flows at zero AI cost (see [Settings](/settings#offline-mode))
* **Daily token quotas** — set a maximum daily AI usage in **Dashboard > Settings** to prevent surprise bills

***

## Switching providers

You can switch between OpenAI and Anthropic at any time:

1. Go to **Settings > AI Provider**
2. Select the new provider
3. Paste the new API key
4. Click **Save**

Your knowledge base, conversation history, and all settings are preserved. Only the AI model powering the responses changes.

***

## Troubleshooting

### "API key invalid" error

* Make sure you copied the full key (no extra spaces)
* Verify billing is set up on your AI provider account
* Check that the key hasn't been revoked in your provider's dashboard

### Bot not responding

* Confirm your API key is active and has billing enabled
* Check your AI provider's status page for outages
* Verify you haven't hit your provider's rate limits or spending caps

### Responses are slow

* Try switching to a faster model (GPT-4o-mini or Claude Haiku)
* Check your AI provider's status page — response times can vary during peak usage

For more help, see [Troubleshooting](/troubleshooting).
