API Keys
How to get API keys for each supported provider and connect them to ContentAI.
ContentAI uses a Bring Your Own Key (BYOK) model. Each user connects their own API keys from one or more AI providers. Keys are stored in the browser's localStorage and sent to the /api/generate endpoint only when making a generation request.
Supported providers
| Provider | Free tier? | Best for |
|---|---|---|
| Groq | Yes — generous | Fastest responses, most free usage |
| Google Gemini | Yes — limited | Quality balance, long context |
| OpenAI | No — pay-per-use | Best overall quality with GPT-4 family |
| Anthropic | No — pay-per-use | Long reasoning, careful tone (Claude) |
New here? Start with Groq
Groq gives you real, fully-free access — no credit card required — with generous rate limits. Use it to try ContentAI end-to-end before deciding if you want a paid provider.
Groq (free, recommended)
Get a key
- Open https://console.groq.com/keys
- Sign in with GitHub or Google
- Click Create API Key, give it a name like "ContentAI"
- Copy the key (starts with
gsk_...)
Connect it
- In ContentAI, go to Settings
- Find the Groq card
- Paste your key, pick a model (llama-3.3-70b-versatile is a great default)
- Click Test → you should see a success toast
- (Optional) Click Set as active provider to make Groq the default for new generations
Google Gemini (free)
Get a key
- Go to https://aistudio.google.com/apikey
- Sign in with your Google account
- Click Create API key in new project
- Copy the key
Connect it
- In ContentAI, go to Settings
- Find the Google card
- Paste the key, pick a model (gemini-2.0-flash-exp or gemini-2.5-flash)
- Click Test
Gemini free tier quotas
Google's free Gemini quota is per minute and per day. If you see a 429 error, wait a minute and retry, or switch to Groq for that session.
OpenAI
Get a key
- Go to https://platform.openai.com/api-keys
- Sign in and click Create new secret key
- Copy the key (starts with
sk-...)
You'll need to add at least $5 of credit to your OpenAI account before the key works.
Connect it
- In ContentAI, go to Settings
- Find the OpenAI card
- Paste the key, pick a model (gpt-4o-mini for cheap, gpt-4o for quality)
- Click Test
Anthropic (Claude)
Get a key
- Go to https://console.anthropic.com/settings/keys
- Sign in and click Create Key
- Copy the key (starts with
sk-ant-...)
You'll need billing set up on your Anthropic account.
Connect it
- In ContentAI, go to Settings
- Find the Anthropic card
- Paste the key, pick a model (claude-3-5-sonnet-20241022 is a great default)
- Click Test
Switching between providers
The active provider is used for every new generation. To switch:
- Open Settings
- Click Set as active provider on the card for the provider you want
The active provider and selected model are shown as a badge on the Generate and Editor pages.
Multiple keys, same provider?
Not supported in v1.0 — one key per provider. If you need multiple keys (e.g. separate billing buckets), you can edit lib/store.ts to change apiKeys from Record<AIProvider, string> to Record<AIProvider, string[]>.
Resetting keys
Clearing your browser's site data for the app will remove all API keys, generations, and documents. You can also click Clear all data at the bottom of the Settings page.
Next: Models →