# Setting Up AI Providers

Step-by-step guides for getting API keys from Anthropic, Google, DeepSeek, and OpenAI.

AI Data Stream supports four AI providers. This guide walks you through getting an API key from each one and adding it to your account.

## Anthropic (Claude)

Anthropic offers the Claude family of models, which excel at nuanced analysis and longer documents.

**Available models:**

- **Claude Sonnet 4.6** - Best balance of speed and capability
- **Claude Opus 4.6** - Most intelligent, best for complex analysis
- **Claude Haiku 4.5** - Fastest, great for quick queries

### Getting Your API Key

1. Go to [console.anthropic.com](https://console.anthropic.com)
2. Sign up or log in
3. Navigate to **API Keys** in the sidebar
4. Click **Create Key**
5. Name your key and copy it

### Adding to AI Data Stream

1. Go to **Settings → AI Providers**
2. Click **Add Provider**
3. Select **Anthropic**
4. Paste your API key
5. Choose your default model
6. Click **Save**

---

## Google Gemini

Google's Gemini models offer excellent performance at competitive prices, with options ranging from ultra-fast to highly capable.

**Available models:**

- **Gemini 3 Flash** - Best balance of speed and capability
- **Gemini 3 Pro** - Most advanced
- **Gemini 2.5 Pro** - Complex reasoning
- **Gemini 2.5 Flash** - Previous generation, reliable
- **Gemini 2.5 Flash Lite** - Fastest, most affordable

### Getting Your API Key

1. Go to [ai.google.dev](https://ai.google.dev)
2. Click **Get API key in Google AI Studio**
3. Sign in with your Google account
4. Click **Create API key**
5. Select or create a project
6. Copy your API key

### Adding to AI Data Stream

1. Go to **Settings → AI Providers**
2. Click **Add Provider**
3. Select **Google**
4. Paste your API key
5. Choose your default model
6. Click **Save**

---

## DeepSeek

DeepSeek offers budget-friendly AI models with strong performance for analytics tasks.

**Available models:**

- **DeepSeek Chat** - Best balance, general purpose
- **DeepSeek Reasoner** - Deep thinking for complex problems

### Getting Your API Key

1. Go to [platform.deepseek.com](https://platform.deepseek.com)
2. Create an account or log in
3. Navigate to **API Keys**
4. Click **Create new API key**
5. Copy your key

### Adding to AI Data Stream

1. Go to **Settings → AI Providers**
2. Click **Add Provider**
3. Select **DeepSeek**
4. Paste your API key
5. Choose your default model
6. Click **Save**

---

## OpenAI

OpenAI offers the GPT family and reasoning models with broad capabilities.

**Available models:**

- **GPT-4o** - Best balance of speed and capability
- **GPT-4o Mini** - Fastest
- **GPT-5.4** - Most capable
- **GPT-5.4 Pro** - Maximum intelligence
- **GPT-5 Mini** - Fast
- **o3** - Deep reasoning
- **o4-mini** - Fast reasoning

### Getting Your API Key

1. Go to [platform.openai.com](https://platform.openai.com)
2. Sign up or log in to your account
3. Click your profile icon → **View API keys**
4. Click **Create new secret key**
5. Give it a name (e.g., "AI Data Stream")
6. Copy the key immediately—you won't see it again

### Adding to AI Data Stream

1. In AI Data Stream, go to **Settings → AI Providers**
2. Click **Add Provider**
3. Select **OpenAI** from the dropdown
4. Paste your API key
5. Choose your default model
6. Click **Save**

---

## Choosing the Right Model

Each model in AI Data Stream shows a description of what it's best for. As a general guide:

- **For quick checks:** Use faster models like Gemini Flash Lite, Claude Haiku, or GPT-4o Mini
- **For daily analysis:** Use balanced models like Claude Sonnet, Gemini Flash, or GPT-4o
- **For complex analysis:** Use powerful models like Claude Opus, Gemini Pro, or GPT-5.4 Pro
- **For deep reasoning:** Use thinking models like DeepSeek Reasoner, o3, or GPT-5.4

You can switch models anytime based on your needs.

## Using Multiple Providers

You can add API keys from all four providers and switch between them:

1. Add keys for each provider you want to use
2. Set a default provider and model
3. When starting a new chat, select which model to use
4. Switch models mid-conversation if needed

This lets you:

- Use affordable models for routine checks
- Switch to powerful models for important analysis
- Have a backup if one provider has issues

## Managing Your Keys

### Rotating Keys

For security, periodically rotate your API keys:

1. Generate a new key in your AI provider's dashboard
2. Add the new key to AI Data Stream
3. Delete the old key from AI Data Stream
4. Revoke the old key in your AI provider's dashboard

### Setting Spending Limits

Most AI providers let you set monthly spending limits. Check your provider's billing settings to configure caps and usage alerts.

### Monitoring Usage

Track your AI costs in each provider's dashboard:

- Anthropic: [console.anthropic.com](https://console.anthropic.com)
- Google: [console.cloud.google.com/billing](https://console.cloud.google.com/billing)
- DeepSeek: [platform.deepseek.com](https://platform.deepseek.com)
- OpenAI: [platform.openai.com/usage](https://platform.openai.com/usage)

## Troubleshooting

### "Invalid API key" Error

- Check that you copied the entire key
- Make sure there are no extra spaces
- Verify the key is still active in your provider's dashboard

### "Rate limit exceeded" Error

- You've hit your provider's rate limits
- Wait a few minutes and try again
- Consider upgrading your plan with the AI provider

### "Insufficient credits" Error

- Add credits/payment method to your AI provider account
- Check your spending limits aren't blocking requests

### Requests Timing Out

- Try a faster model (Gemini Flash Lite, Claude Haiku)
- Simplify your query
- Check your internet connection

## Next Steps

- [Start your first conversation](/docs/getting-started/#step-5-start-your-first-conversation)
- [Learn about prompt presets](/docs/prompt-presets/)
- [Understand BYOK benefits](/docs/byok-explained/)
