BYOKAPI keyssetup guidegeminigrok

Getting Your Gemini and Grok API Keys: A Practical Setup Guide for Browsy

A step-by-step walkthrough for generating a Gemini or Grok API key, storing it safely, understanding rate limits, and troubleshooting the errors that come up most often with BYOK tools.

· By Browsy Team

Key takeaways

  • Gemini keys come from Google AI Studio (ai.google.dev); Grok keys come from the xAI console (console.x.ai) — both take a few minutes and don't require a credit card to start.
  • An API key is a password. Never paste it into a chat prompt, commit it to a public repo, or share a screenshot that includes it — treat it exactly like you'd treat a login credential.
  • You can add both a Gemini key and a Grok key to Browsy at once and set a provider order, so the extension fails over automatically if one hits a rate limit.
  • Most 'it stopped working' reports trace back to one of three causes: an invalid or revoked key, a per-minute rate limit, or a daily quota reset — and each has a different fix.

Every post on this blog eventually arrives at the same instruction: “generate an API key and paste it in.” That’s the entire BYOK setup, and it genuinely takes a few minutes — but “a few minutes” hides a handful of decisions worth getting right the first time: which provider to start with, where the key actually lives once you have it, and what to do when a request fails with an error you haven’t seen before.

This post is the walkthrough. If you’ve already read What Is BYOK, you know why you’re doing this. Here’s how, for both providers Browsy supports today.

Before you start: pick a provider (or use both)

Browsy works with Gemini (Google) and Grok (xAI). You don’t have to choose permanently — you can add a key for either one, both, or switch later, and nothing about your existing setup breaks when you do.

A reasonable default if you have no preference: start with Gemini. Google’s free tier is generous enough that most people doing writing-assistance work (grammar fixes, rewrites, tone changes) won’t hit a limit in normal use, and account creation is just your existing Google account — no separate signup.

If you already have API access to one provider for other reasons (you’re a developer using Grok elsewhere, for instance), there’s no downside to reusing that same key in Browsy. And if you add keys for both providers, Browsy’s settings let you set a provider order — the extension tries your first choice and automatically falls over to the second if the first one is rate-limited or temporarily unavailable. You get the redundancy without doing anything manually mid-task.

Getting a Gemini API key

  1. Go to ai.google.dev and sign in with the Google account you want tied to this key.
  2. Find the API key section (Google AI Studio’s key management page) and create a new key. You’ll be asked to associate it with a Google Cloud project — if you don’t have one, the flow creates one for you automatically.
  3. Copy the key. It’s a long string starting with AIza.
  4. Open Browsy’s options page, paste the key into the Gemini field, and save.

That’s the whole process — no payment method is required to get a working free-tier key. If you later want higher throughput than the free tier allows, the same Google Cloud project can be linked to billing, and Gemini’s paid pricing applies only to the requests you make above the free allotment.

Getting a Grok API key

  1. Go to console.x.ai and sign in or create an account.
  2. Navigate to the API keys section of the console and create a new key.
  3. Copy the key immediately — most provider consoles, xAI’s included, show the full key value only once at creation time. If you navigate away before copying it, you’ll need to generate a new one.
  4. Paste it into the Grok field in Browsy’s options page and save.

xAI’s free-tier terms and rate limits change more often than Google’s, so check the console’s current limits rather than relying on a number quoted somewhere else — including this post.

Keeping the key safe

An API key authenticates as you to the provider’s billing account. Anyone who has it can make requests that you pay for. A short list of habits that matter more than they sound like they should:

  • Never paste your key into a prompt or chat window — including a Gemini or Grok chat itself, if you’re troubleshooting. If you need help debugging a key issue, describe the error, don’t paste the key.
  • Never commit a key to a public repository, a shared document, or a support ticket screenshot. If you’re a developer and this happens, treat the key as compromised — revoke it immediately from the provider console and generate a replacement.
  • Rotate periodically if you’ve shared access to a machine, or immediately if you suspect exposure. Both Google AI Studio and the xAI console let you revoke a key and issue a new one in under a minute; Browsy just needs the new value pasted into the options page.
  • Check where Browsy actually stores it before you trust it. As covered in Privacy by Architecture, Browsy keeps your key in chrome.storage.local — device-local, never synced, never sent anywhere except in a direct request to the provider you chose. You can verify this yourself in Chrome’s DevTools Network tab.

Understanding rate limits and quotas

Both providers cap usage in two dimensions: a per-minute rate limit (how many requests you can fire in rapid succession) and a daily or monthly quota (a longer-window cap that resets on a schedule). Free tiers exist under both caps; paid tiers typically raise the per-minute limit substantially and either raise or remove the longer-window cap in exchange for usage-based billing.

For normal writing-assistance use — running Fix Grammar or Rewrite on a paragraph a few times an hour — you’re unlikely to brush against either limit. Where people do hit them: batch-processing a long document by selecting and rewriting many sections back-to-back within a minute or two, which can trip the per-minute limit even on a free tier that would never be exhausted by a day of ordinary use.

If you’re curious how the cost side of this actually nets out against a subscription tool, Why Most “Free” AI Extensions Aren’t Actually Free walks through the math in more detail.

Troubleshooting: when a key stops working

If Browsy shows an error instead of a result, it almost always falls into one of these categories:

“Invalid API key.” The key was mistyped, has extra whitespace from copy-paste, or was revoked on the provider’s side. Re-copy the key directly from the provider console (don’t retype it) and re-save it in Browsy’s options.

Rate limit / “too many requests.” You’ve exceeded the per-minute cap. This resolves itself within a minute or two — if you’ve set a provider order with both keys added, Browsy fails over to the other provider automatically rather than making you wait.

Quota exceeded. You’ve hit the daily or monthly cap for a free tier. This resets on the provider’s schedule (usually daily), or you can add billing to the same account to lift the cap immediately.

Nothing happens, no error shown. Check that the key is actually saved — reload Browsy’s options page and confirm the field still shows a masked key value. A key that failed to save silently is the most common cause of “it just doesn’t respond.”

If none of the above matches what you’re seeing, the underlying request and response are visible in Chrome’s DevTools Network tab, filtered to the provider’s domain — that’s the same verification path used to confirm the privacy architecture, and it’s equally useful for debugging.

The five-minute investment

Once a key is in place, it stays in place. You won’t repeat this setup unless you rotate a key for security reasons or add a second provider later. Everything downstream of this — all six writing tools, the streaming responses, the fact that none of it touches a Browsy server — runs on whichever key you’ve pasted in, at whatever rate your provider allows.


Already have a key in place and running into something this post didn’t cover? The error message shown in Browsy’s toolbar, plus the request details in DevTools’ Network tab, will tell you more than any general troubleshooting guide can — including this one.

Ready to try it?

Browsy is free — no account required

Add to Chrome — Free