Skip to content
Track progress 0%

Lesson 11 4 min

When to bring your own API key

The same chain works with a model in your browser, a cloud provider with your key, or Ollama on your computer. Choose by cost, privacy and the job.

Three places a model can run

In your browser (Web LLM) Cloud, with your key (Chat OpenAI, Chat Anthropic, Chat Google) Your computer (Ollama)
Cost Free A little per run, billed by the provider No per-call cost
Privacy Nothing leaves your device The prompt, page text included, goes to the provider Stays on your computer
Best when Nothing to install, nothing may leave the browser You need the strongest reasoning and reliable tool use Data must stay on your machine and you can run a model server

In-browser models are smaller and slower. Choose by the job, not by raw power: try the smallest model that gets your real inputs right.

Use an API key

Replace Web LLM with Chat OpenAI, Chat Anthropic or Chat Google. In Authentication, click + Add Credential, paste your API key from the provider’s website and click Create Credential, then choose a model. The key is stored in AWFlow and sent only to that provider.

Or run Ollama

Install Ollama on your computer, pull a model with ollama pull llama3.2, and start it with OLLAMA_ORIGINS set to the extension’s origin, so the extension may call it:

OLLAMA_ORIGINS=chrome-extension://linlkeaipfpnhddjkpcbmldionajfifa ollama serve

In Firefox, use OLLAMA_ORIGINS=moz-extension://*. Then pick the Ollama node and choose your model in Model (click Refresh models if the list is empty). Nothing leaves your computer.

Key takeaways

  1. In-browser models are free and private; cloud models are the strongest and billed by the provider.
  2. Keys are saved as credentials and sent only to that provider.
  3. Ollama needs OLLAMA_ORIGINS set to the extension's origin.