AppInspected

Can your Google API key call Gemini?

Paste a Google API key (AIza…) or a Gemini key (AQ.…) that's in your site's code, your .env or your firebaseConfig. Your browser asks Google's Gemini API, once, whether it accepts the key. Nothing is generated and nothing goes through AppInspected.

Only test a key you own. It goes from your browser straight to Google, nowhere else.

Free. No sign-up. We only read what your visitors' browsers already read.

Passive and read-only. Works with any public site, including apps built with Lovable, Bolt, v0, Replit, Base44, Cursor, Windsurf and Claude Code.

AppInspected
Site
Waiting for your address
Checked
–
Critical issues
–
Not checked yet
Your result fills in this tag. Nothing is stored.

Why a Google key in your code can be a Gemini key

Google API keys that start with AIza are used for Firebase, Maps and Gemini alike. A Firebase or Maps key has to sit in your page's JavaScript, so it's public by design. A key that can call the Gemini API is different: anyone who copies it from your site can run Gemini on your project, and on your bill.

The two used to overlap. In February 2026 Truffle Security reported that public Google keys in projects with the Gemini API turned on could call it, and found 2,863 live keys like that on public websites. Google has since closed the worst of it: since June 19, 2026 the Gemini API rejects unrestricted keys on projects where it's enabled. A key whose API restrictions include the Gemini API still works for whoever has it. That's the usual case for a key made in Google AI Studio and pasted into a VITE_GEMINI_API_KEY or NEXT_PUBLIC_GEMINI_API_KEY variable, which the build copies into the JavaScript every visitor downloads (secrets in VITE_ variables, secrets in NEXT_PUBLIC_ variables).

Since May 28, 2026, new keys made in Google AI Studio are "auth keys" (developers see them start with AQ.), restricted to the Gemini API by default. They belong on a server just the same. Google's own rule for Gemini keys: "Never expose keys client-side in production"; keys compiled into web apps "can be extracted by users", so run a backend proxy that makes the calls.

What the checker does

It sends one request from your browser to Google, a GET to generativelanguage.googleapis.com that lists one model (/v1beta/models?pageSize=1), with your key in the x-goog-api-key header, no cookies and no website address. Listing models generates nothing. Google's answer tells us whether the Gemini API accepts the key:

What each result means
ResultWhat Google saidWhat to do
Gemini accepts this keyThe model list came back (or "quota exceeded", which also means the key was accepted)If the key is in public code: delete or rotate it now (below)
This key can't call GeminiAPI_KEY_SERVICE_BLOCKED: the key's API restrictions leave Gemini outNothing for Gemini. Keep it that way
Gemini is off on this key's projectSERVICE_DISABLED: the Generative Language API isn't enabledFine today. Restrict the key before anyone turns Gemini on
Blocked here by a website restrictionAPI_KEY_HTTP_REFERRER_BLOCKEDNot a lock: scripts can send any website address. Check the key's API list
Not a working keyAPI_KEY_INVALID: deleted, expired or mistypedRemove it from your code anyway

Is it safe to use?

The checker is a small script on this page (read it). Your key goes from your browser to generativelanguage.googleapis.com and nowhere else; AppInspected never sees it, and the result box shows it cut short. Listing models sends and generates no text, and Gemini API pricing is based on input and output tokens. Only test keys you own.

Gemini accepts a key that's in your code? Fix it in this order

  1. Make a new key, then delete the old one

    Create a new key in Google AI Studio > API keys, put it where only your server reads it (next step), deploy, then delete the old key in Google Cloud console > APIs & Services > Credentials. If the key is being abused right now, delete it first and accept a few minutes of downtime. Assume it was copied: anything in your site's JavaScript has been downloaded by every visitor.
  2. Check usage and billing

    In the Google Cloud console look at the Generative Language API's traffic and at Billing > Reports for the last days. Unusual spikes mean someone else used it. Budget alerts only warn you; they don't stop spending.
  3. Call Gemini from your server

    Put the new key in a server-only environment variable (no VITE_ or NEXT_PUBLIC_ prefix) and call Gemini from an API route, a serverless function or a Supabase Edge Function that checks the signed-in user and rate-limits. Same pattern as call OpenAI from a Supabase Edge Function. Browser-only apps can use Firebase AI Logic with App Check instead of a raw key.
  4. Restrict every key that stays public

    Your Firebase or Maps key: in Credentials set website restrictions to your domains and API restrictions to only the APIs the page calls. The Gemini API (Generative Language API) shouldn't be on that list. Details: Google API key in your website code.
  5. Check the rest of your site

    Where there's one key there are often more. Run the free check above on your live address: it reads your homepage and its scripts for OpenAI, Anthropic, OpenRouter, Stripe, Supabase and other keys.

What this checker can't tell you

  • Your bill. It can't see your usage, quotas or spending. Look in the Google Cloud console.
  • Other Google APIs. It asks the Gemini API only. A key that can't call Gemini may still reach Maps or other paid APIs if it isn't restricted.
  • Where else the key is. It tests the key you paste. The free check finds Google keys in your live site's JavaScript (and shows them cut short), and the $19 website security report reads up to 30 pages and 40 scripts, plus exposed files like .env and source maps. If the report can't be completed or comes out broken, you get a full refund.

Website security report

$19 one time

For any website you own: a read-only review of up to 30 pages and 40 JavaScript files (found through your build manifest, routes and sitemap), app logic in the browser (admin and paid-feature checks, prices sent from the browser, AI APIs called directly), headers, cookies and CORS, domain and email records, libraries with known vulnerabilities, forgotten files and third-party scripts, with fixes written for your host. Optional database tests for Supabase or Firebase. Requires proof you own the site.

Example report header: a score out of 100, findings by severity, Download PDF and Email me this report.See an example reportGet the report

Badge + daily monitoring

$9 per month

We repeat the outside checks every day and email you when something changes: a new key in your JavaScript, a removed header, a new third-party script, a certificate about to expire. Includes a live badge and one full website report every 30 days.

How monitoring works

Sources

Questions

How do I check if my Gemini API key is exposed?

Open your live site, press F12, and search the Sources or Network tab for AIza and AQ. to see which Google keys your JavaScript carries. Paste each one into the checker on this page to see whether Gemini accepts it. The free site check above finds Google keys in your homepage's scripts for you.

Is it safe to put a Gemini API key in frontend code?

No. Anyone who opens your site can copy it and call Gemini on your project. Call Gemini from a server or serverless function that keeps the key in a server-only variable, or use Firebase AI Logic with App Check for browser-only apps.

My Firebase API key is in my code. Can it call Gemini?

Not if its API restrictions leave out the Gemini API (Generative Language API), or if Gemini isn't enabled on the project. Paste it here to see. Since June 19, 2026 Google also rejects unrestricted keys on projects with Gemini enabled.

Does this tool see or store my key?

No. The key goes from your browser straight to Google's Gemini API in one request. AppInspected's servers never receive it, and the page shows it cut short.

Does the test cost anything?

It shouldn't. The checker only asks for the list of models, so no text is sent or generated, and Gemini API pricing is based on input and output tokens.

What are AQ. keys?

Since May 28, 2026 Google AI Studio creates new keys as "auth keys", bound to a service account and restricted to the Gemini API by default; developers see them start with AQ. They're credentials like any other API key: keep them on a server.

Gemini accepts my key. What first?

Delete or regenerate it in Google AI Studio or the Google Cloud console's Credentials page, check usage and billing, then move Gemini calls to your server with a new key in a server-only variable.

More free checks and guides