Skip to content

Connecting Gemini

Aninda Sundar Howlader edited this page Jul 20, 2026 · 1 revision

Connecting Google Gemini (for generated pictures, audio and video)

Google Gemini is Google's set of cloud AI models — programs that run on Google's own computers rather than yours. GRU953-Studio can use them to make pictures, audio and video for the app it is building for you. This page explains, in plain steps, what that means, how to switch it on, and how your details are kept safe.

You do not need this to build an app. It is an optional extra, and it stays switched off until you deliberately turn it on.

What Gemini is used for here — media only

When GRU953-Studio connects to Gemini, it uses it for one thing only: generated media. That means:

  • Pictures — images, icons and illustrations
  • Audio — narration and sounds
  • Video — short clips

That is the whole list. All written words in your app — in both Bangla and English — are always written by Claude, the AI that runs GRU953-Studio itself. Text never goes through Gemini. So Gemini is only ever reached when your project genuinely needs a picture, a sound or a video, and never for anything you can read.

It's completely optional, and off until you say yes

Gemini is the first outside cloud service GRU953-Studio ever reaches for. Everything else it does runs privately, without sending your work anywhere. Because Gemini is different, it is treated with extra care:

  • It is off by default. Nothing is sent to Google unless you have switched it on for your project.
  • The studio's content director asks you once, in plain language — what it is, that it uses Google's paid cloud, that your content is sent to Google, and that it needs your own key — and records your answer.
  • If you say no (or say nothing), the studio simply makes a stand-in picture or sound and gives you a short guide to add your own. It never quietly calls Google behind your back.

It uses your own Google key

To use Gemini, you need a Google API key. An API key is a personal pass code that lets a piece of software use your Google account on your behalf — a bit like a door key that is yours alone.

A few important points:

  • The key is yours, from your own Google account. GRU953-Studio never provides one for you.
  • The studio reads your key only from your computer's own settings, at the moment it needs it (more on this below).
  • Google charges you for what you generate. Getting a key costs nothing, but each picture, audio clip or video you make is billed to your Google account by Google. The studio always shows you an estimated cost before it makes anything.

Before you start

You'll need Notes
A Google account The ordinary account you use for Gmail or other Google services
A Gemini API key You create this once, in Google AI Studio (steps below)
A little money Google charges for each generation; you pay Google directly

Step 1 — get a Gemini API key from Google AI Studio

Google AI Studio is Google's own website for setting up access to Gemini.

  1. Open your web browser and go to https://ai.google.dev.
  2. Sign in with your Google account if you are asked to.
  3. Find the option to get or create an API key (Google labels this "Get API key" or "API keys").
  4. Follow Google's on-screen steps to create a new key. You may be asked to pick or set up a billing account, since generating media is a paid service.
  5. When your key appears, copy it. It is a long line of letters and numbers, usually starting with the characters AIza.
  6. Keep it somewhere private for the next step — treat it like a password. Do not paste it into your app's files, into a message, or anywhere public.

A note on safety: if you ever think someone else has seen your key, go back to Google AI Studio and delete it, then create a fresh one. An old key can be switched off at any time.

Step 2 — save your key as an environment variable

An environment variable is simply a setting your computer remembers and hands to programs when they ask for it. GRU953-Studio looks for your key in a setting named GEMINI_API_KEY. (It will also accept the name GOOGLE_API_KEY if you already use that one.)

Saving the key this way — rather than typing it into a file — is deliberate. It keeps the key in your computer's own settings and out of your project, so it can never be accidentally shared.

The steps differ for Mac or Linux computers and for Windows. Follow the section that matches your computer.

On a Mac or Linux computer

On a Mac or Linux machine, you add one line to your shell profile — a small settings file your computer reads each time you open the Terminal (the text-based window where you type commands).

  1. Open the Terminal app.

  2. On most modern Macs the profile file is called .zshrc; on many Linux computers it is .bashrc. If you are unsure, use .zshrc on a Mac.

  3. Open that file in a simple text editor by typing this and pressing Enter (this example opens .zshrc):

    open -e ~/.zshrc
    

    On Linux, you can use nano ~/.bashrc instead.

  4. Add this line at the bottom of the file, replacing your-key-here with the key you copied from Google:

    export GEMINI_API_KEY="your-key-here"
    
  5. Save the file and close the editor.

  6. Close the Terminal completely and open a new one, so the new setting is loaded.

  7. To check it worked, type this and press Enter:

    echo $GEMINI_API_KEY
    

    If your key prints back, it is set. (Once you have confirmed it, you can clear the screen — it is best not to leave your key on display.)

On a Windows computer

On Windows you have two ways to do this. The first is quicker; the second uses a settings screen if you prefer clicking to typing.

Option A — a single command

  1. Open the Command Prompt app (search for "Command Prompt" in the Start menu).

  2. Type this, replacing your-key-here with the key you copied, then press Enter:

    setx GEMINI_API_KEY "your-key-here"
    
  3. You should see a message saying the value was saved.

  4. Close the Command Prompt and open a new one, so the setting is loaded.

Option B — the System settings screen

  1. Click the Start menu and type environment variables.
  2. Choose Edit the system environment variables from the results.
  3. In the window that opens, select the Environment Variables button.
  4. Under "User variables", select New.
  5. In the Variable name box, type GEMINI_API_KEY.
  6. In the Variable value box, paste your key from Google.
  7. Select OK on each open window to save and close them.
  8. Close any open Command Prompt or app windows and reopen them, so the new setting is picked up.

Step 3 — turn Gemini on for your project

Once your key is saved, Gemini is ready but still switched off. GRU953-Studio will ask whether you want to use it the first time your project needs a picture, sound or video. Say yes and it is on for that project; say no and the studio makes a stand-in instead. You are always in control, and you can decline at any point.

How your key is kept safe

GRU953-Studio handles your key with a strict set of rules:

  • It reads the key only from your computer's environment, at the moment it makes a request — never from a saved file.
  • It never writes your key to a file, so it cannot end up inside your project.
  • It never prints your key on screen or in logs.
  • It never uploads your key anywhere, and never commits it — "committing" means saving something into your project's shared history, which is how files get published. Your key never goes there.

As a safety net, one of the studio's built-in checks (a small script called scan.mjs) blocks any Google key or key-file from ever being published, even if one slipped in by accident. But the main rule is simpler: your key never goes into a file in the first place.

What happens each time media is generated

Because generated media costs money and leaves your computer, GRU953-Studio checks with you before every single generation — not once, but each time. Here is what you see:

  1. A plain-English cost estimate for that specific picture, sound or clip.
  2. A clear notice that the request is sent to Google's servers.
  3. A pop-up asking what you'd like to do: generate it, change the wording of the request, or skip it.

Only a clear yes makes anything. If you skip or change your mind, nothing is sent and nothing is charged. The studio also keeps a running note of what each generation actually cost, and a set spending limit still applies, so costs never run away from you.

If there's no key or no connection

Missing key, no internet, or a session where Google simply cannot be reached — none of these are treated as failures. When Gemini is unavailable, GRU953-Studio does two calm things instead:

  1. It makes a placeholder — a clearly marked stand-in picture, sound or video — so your project keeps moving.
  2. It gives you a simple, numbered guide to add the real media yourself, at your own pace.

In other words, Gemini being switched off or out of reach is a normal path, never an error message that stops your work.

A note on model names

Google renames and reprices its Gemini models fairly often — the picture model, the video model (currently called Veo) and the audio model all change names from time to time. GRU953-Studio does not rely on a fixed name. Instead it checks Google's current model for the job before it uses it, so the studio keeps working correctly even after Google makes a change. You do not need to track any of this yourself.

No extra software to install

GRU953-Studio does not bundle any Gemini software. It talks to Google using ordinary, standard web requests and your own key — nothing to download, install or keep updated on the Gemini side. Setting your key (Step 2 above) is the only setup you do.

Where to go next

  • New to GRU953-Studio? Start with Installation.
  • Prefer a private, no-cost AI that runs on your own computer? See Connecting Ollama. Ollama is free to use (no cost) and stays on your machine, but it is for a different purpose — a local AI helper, not generated media.
  • Want the fuller picture of what the studio can do? See Features and Skills and capabilities.
  • Something not working? Try Troubleshooting or the FAQ.
  • The exact rules behind this feature live in the studio's own source file: read the Gemini integration skill.

Clone this wiki locally