Setup Guide

Provider Setup

Connect PromptLab to any AI provider in under two minutes. API keys are stored locally in extension storage and used only to send requests to your selected provider.

00

How provider configuration works

PromptLab routes all API calls through its background service worker. Your API key never touches the panel UI — it lives in extension storage, sandboxed away from the page context. When you run an enhance or A/B test, the extension reads your stored key and sends the request directly to your chosen provider.

Five providers supported: Anthropic Claude, OpenAI, Google Gemini, OpenRouter (gateway to 200+ models), and Ollama for fully local inference. You can switch providers at any time from Options without losing your library or settings.
01

Opening the Options page

1
Open PromptLab

Click the PromptLab icon in your browser toolbar to open the side panel.

2
Go to Settings → Manage Provider Keys

Open the Settings modal inside the panel and click Manage Provider Keys. This is the fastest path to the Options page.

3
Select your provider

Click the provider chip at the top of the Options page. The form below updates to show that provider's configuration fields.

4
Save and test

Enter your credentials, click Save, then click Test Connection to verify. A success message confirms the connection.

You can also reach Options by right-clicking the PromptLab extension icon in the toolbar and choosing Options.

02

Configure a provider

1
Get your API key

Go to Anthropic API settings and create a new key. Copy it — it's only shown once.

2
Paste into Options

Select the Anthropic chip in Options. Paste your key into the API Key field.

Key format
API Key   sk-ant-api03-••••••••••••••••••••
3
Choose a model

Select from the dropdown. Recommended starting point: claude-sonnet-4-6 — strong capability at moderate cost.

Free tier: New Anthropic accounts receive a small credit. No credit card required to start.
1
Get your API key

Go to platform.openai.com/api-keys, click Create new secret key, and copy it.

2
Paste into Options

Select the OpenAI chip. Paste your key into the API Key field.

Key format
API Key   sk-proj-••••••••••••••••••••••••••
3
Choose a model

Use the default model recommended in PromptLab's dropdown, or check OpenAI's model docs for the latest options. Recommendations change frequently as new versions ship.

!
Note: OpenAI requires a funded account to use the API. Add credits at platform.openai.com/billing.
1
Get your API key

Go to aistudio.google.com/app/apikey and click Create API key. A Google account is required.

2
Paste into Options

Select the Gemini chip. Paste your key into the API Key field.

Key format
API Key   AIzaSy••••••••••••••••••••••••••••
3
Choose a model

Current recommended models: gemini-2.5-pro for complex prompts, gemini-2.5-flash for faster lighter tasks. Check Google's model docs for the latest.

Free tier available: Google AI Studio provides a free tier with generous rate limits. Paid usage is billed through Google Cloud.
1
Create an OpenRouter account

Go to openrouter.ai/keys, sign in, and generate an API key.

2
Add credits

OpenRouter uses a prepaid credit system. Add a small amount at openrouter.ai/credits. Many models also have free tiers.

3
Paste key and enter a model slug

Select the OpenRouter chip in Options. Paste your key. In the Model field, enter a model slug from openrouter.ai/models.

Example model slugs
anthropic/claude-sonnet-4-20250514
openai/gpt-4o
meta-llama/llama-3.1-70b-instruct
mistralai/mistral-7b-instruct:free
Best for exploration: OpenRouter gives you access to 200+ models through a single key. Great for A/B testing across providers without managing multiple accounts.
!
Model slugs are case-sensitive and must exactly match the identifier shown on openrouter.ai/models. A typo will produce a runtime error rather than a helpful message.
1
Install Ollama

Download and install Ollama for your OS from ollama.com/download.

macOS
Download the .dmg installer
Windows
Download the .exe installer
Linux
curl -fsSL https://ollama.com/install.sh | sh
2
Pull a model

Open a terminal and pull any model from the Ollama library. Examples:

ollama pull llama3.2          # 3B, fast, ~2GB
ollama pull llama3.1:8b       # 8B, balanced, ~5GB
ollama pull mistral           # Mistral 7B, ~4GB
ollama pull qwen2.5-coder:7b  # code-focused, ~5GB
3
Verify Ollama is running

Ollama starts automatically after install. Confirm it's up:

curl http://localhost:11434/api/tags
# Returns a JSON list of your installed models
4
Configure in Options

Select the Ollama chip. The Base URL defaults to http://localhost:11434 — leave this unless you're running Ollama on a different port or remote host. Enter the model name exactly as it appears in your pull command.

Options fields
Base URL   http://localhost:11434
Model      llama3.2
Fully local — no API key required. Your prompts never leave your machine. Ideal for sensitive content, offline use, or unlimited local experimentation.
!
Ollama must be running whenever you use this provider in PromptLab. If you get a connection error, open a terminal and run ollama serve.

03

Troubleshooting

!
Test Connection returns an error

Double-check that your API key was copied completely with no trailing spaces. Confirm your account has available credits or quota. For Ollama, confirm the service is running with ollama serve.

!
Enhance / A/B test gives no response

Save your settings in Options, then reload the extension from chrome://extensions and try again.

!
Ollama connection refused

By default Ollama only accepts connections from localhost. You may need to set OLLAMA_ORIGINS before starting Ollama to allow the extension origin:

OLLAMA_ORIGINS=chrome-extension://*,moz-extension://* ollama serve
!
OpenRouter model slug error

Model slugs are case-sensitive and must exactly match the identifier shown on openrouter.ai/models. A typo will produce a runtime error rather than a helpful message.