Cloud Explainers

Google AI Studio Will Finally Make Sense After This

Gemini API & Google AI Studio10 min videoPublished Nov 6, 2026

Google AI Studio explained from the request up: AI Studio is a playground for the Gemini API, and every setting in its Run settings panel is one field in one request. We send the same requests from a terminal and from Python: a system instruction, thinking level, structured output, why temperature no longer changes anything on new models, Get code, the free tier's daily limit, and when Google may use your prompts.

Google AI Studio Will Finally Make Sense After This, the full picture: diagram of You, AI Studio, Your code, Gemini API, Model, What you use, Google's servers
The whole picture, from the video's recap.

The panel nobody explains

You open Google AI Studio to try Gemini, and the right side of the screen is a wall of settings. A model list, thinking, tools, structured output, and a button that says Get code. Nothing tells you what they do, or which ones change your answers.

The Run settings panel in AI Studio: diagram of Model, Thinking, Tools, Structured output, Get code, Every one of these has a plain meaning

Here's the idea that makes it click: every setting in that panel is one field in one request to the Gemini API, the service behind AI Studio. By the end, you'll know which settings change your answers, and what Get code gives you. And there's one setting that isn't in the panel at all, which decides whether people at Google may read your prompts. We'll find it.

It's one of the first things people ask. On Google's own developer forum, someone asked: does Google use my prompts and chat history to train its models? The answer depends on something most beginners never look at.

A real question, from Google's AI developer forum: cards of "Are my prompts used?", It depends

What AI Studio really is

So what is AI Studio? It's a web page where you try Google's Gemini models: a playground. When you press Run, the page sends your prompt to the Gemini API, the same service your own code would call, and shows you the reply.

It does three jobs. It's the playground for trying prompts. It's where you get an API key, the password your code uses. And Get code turns whatever you tried into a request you can run yourself.

AI Studio's three jobs: cards of Playground, API keys, Get code, Same models

When you first open AI Studio, it makes two things for you. A Google Cloud project: the account that holds billing and limits. And inside it, an API key: the password your code sends. Ana's project has billing turned on. We'll see why that matters.

What AI Studio sets up for you: diagram of Google account, Cloud project, API key, Ana's project: billing on

Treat the key like a password. In a terminal, the text window where you type commands, Ana keeps hers in an environment variable, a named setting the shell remembers, called GEMINI API KEY, so it never sits in her code. Here we only print its length: 53 characters.

laptop: Ana's terminal
echo ${#GEMINI_API_KEY}53

Every request in this video is real, sent from Ana's laptop with that key. First: which models can it use? The API lists 61. The model list in AI Studio is the same list, including the Flash models we'll use: fast, and cheap.

laptop: Ana's terminal
API=https://generativelanguage.googleapis.com/v1beta
laptop: Ana's terminal
curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "$API/models?pageSize=200" | jq '.models | length'61
laptop: Ana's terminal
curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "$API/models?pageSize=200" | jq -r '.models[].name' | grep -E 'gemini-3\.[5-8]-flash$'models/gemini-3.5-flash
models/gemini-3.6-flash
models/gemini-3.7-flash
models/gemini-3.8-flash

So what happens when you press Run? AI Studio sends one request to the Gemini API: which model, and your prompt. The API checks the key, the model thinks, then writes, and one reply comes back, with a count of the tokens it used.

Pressing Run, as a request: diagram of AI Studio, Gemini API, Model, model + prompt, key checked, thinking, then text, one reply

One prompt, one request

What does pressing Run actually send? One small piece of JSON, a text format for data. The model's name, and your prompt, as input. That's a whole request.

laptop: Ana's terminal
cat plain.json{
  "model": "gemini-3.8-flash",
  "input": "Describe our Sencha green tea for the shop page."
}

Ana's little script, ask, sends a request file the way AI Studio does. curl posts it to the API's address, with the key in a header, a labelled line sent with the request. Then jq, a JSON tool, prints the reply, and the token counts. You never have to type this: AI Studio builds the same request each time you press Run.

laptop: Ana's terminal
cat ask#!/usr/bin/env bash
# Send one request file to the Gemini API, then print the reply and its token counts.
curl -s --max-time 100 https://generativelanguage.googleapis.com/v1beta/interactions \
  -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" -d @"$1" |
  jq -r 'if .error then "error: \(.error.message)" else
    (.steps[] | select(.type == "model_output") | .content[0].text),
    "tokens: in \(.usage.total_input_tokens), thinking \(.usage.total_thought_tokens), out \(.usage.total_output_tokens)"
  end'

Ana asks for a description of her Sencha green tea, for the shop page. Before we look: how much text comes back from that one line? 453 words. It starts like this: a few options, depending on your brand's voice. Fine in a playground, useless on a product page.

laptop: Ana's terminal
./ask plain.json > reply.txt
laptop: Ana's terminal
wc -w reply.txt453 reply.txt
laptop: Ana's terminal
head -3 reply.txtHere are three options for your shop page, ranging from classic and sensory to modern and concise. Choose the one that best fits your brand’s voice.

---

And the last line counts tokens: 12 in, 712 out, and 767 for thinking.

laptop: Ana's terminal
tail -1 reply.txttokens: in 12, thinking 767, out 712

A token is a piece of a word, about four characters of English. Models read and write in tokens, and limits and prices are counted in them. The surprise is thinking: the model reasons first, in tokens you never see, and on paid plans they're charged like output.

One short question, in tokens: chart of Your question (in): 12 tokens, The reply (out): 712 tokens, Thinking, never shown: 767 tokens, Thinking tokens count like output

The settings, one field each

So how does Ana get two calm sentences instead of a menu? With the first box in Run settings: System instructions. It's text the model reads first, for the whole conversation. Then it reads your prompt, and writes a reply that follows both.

What the model reads, in order: diagram of System, Your prompt, The reply

In the request, it's one more field: system instruction. Same prompt, sent again: two short sentences, no exclamation marks, 30 tokens instead of 712.

laptop: Ana's terminal
cat system.json{
  "model": "gemini-3.8-flash",
  "system_instruction": "You write for Ana's Tea Shop. Two short sentences. Calm, no exclamation marks.",
  "input": "Describe our Sencha green tea for the shop page."
}
laptop: Ana's terminal
./ask system.jsonOur Sencha offers a gentle, grassy sweetness with notes of fresh spring dew. It brews into a clear green cup with a soft, quiet finish.
tokens: in 32, thinking 595, out 30

Next in the panel: thinking. It sets how long the model reasons before it answers. In the request it's thinking level, inside generation config. Set it to low, and thinking drops from 595 tokens to 296, for the same kind of answer.

laptop: Ana's terminal
diff system.json low.json4c4,5
<   "input": "Describe our Sencha green tea for the shop page."
---
>   "input": "Describe our Sencha green tea for the shop page.",
>   "generation_config": { "thinking_level": "low" }
laptop: Ana's terminal
./ask low.jsonCarefully steamed leaves produce a clean infusion filled with the fresh taste of spring grasses. Each gentle sip finishes with a light, lingering sweetness.
tokens: in 32, thinking 296, out 28

Why have the choice? Hard questions, like code or maths, get better answers with more thinking. Short writing jobs like Ana's don't need much, and less thinking is faster, and uses fewer tokens.

Thinking tokens for Ana's two-sentence description: chart of Default thinking: 595 tokens, thinking_level: low: 296 tokens, Less thinking: faster, fewer tokens

Older guides say to turn temperature down to zero, so the model gives the same answer every time. Ana adds temperature zero and sends it twice. Before we look: will the two answers match? They don't. And there's no error either.

laptop: Ana's terminal
diff low.json temp0.json5c5
<   "generation_config": { "thinking_level": "low" }
---
>   "generation_config": { "thinking_level": "low", "temperature": 0 }
laptop: Ana's terminal
./ask temp0.jsonThis classic Japanese green tea brews a bright cup with gentle, grassy sweetness. It is a quiet, refreshing infusion meant for peaceful afternoons.
tokens: in 32, thinking 577, out 27
laptop: Ana's terminal
./ask temp0.jsonLightly steamed leaves brew into a delicate cup with notes of sweet grass and tender umami. It offers a quiet, grounding sip to refresh your day.
tokens: in 32, thinking 517, out 31

Google's docs explain it: the newest Gemini models ignore temperature, top P and top K, and say to remove them from requests. Future models will refuse them with an error. If you need answers that stay consistent, write the rules into the system instruction.

Old habit vs what works now: comparison table of Old guides vs Gemini 3.6 and newer, Temperature, Top P, top K, Later models, Consistent answers

From playground to code

Now the tools. Turn on structured output, and you give the model a schema: the exact fields you want back. Ana wants a product card: name, price, and minutes to steep.

laptop: Ana's terminal
cat card.json{
  "model": "gemini-3.8-flash",
  "input": "Sencha green tea, 100 g tin, 8 euros, steep 2 minutes at 75 C.",
  "generation_config": { "thinking_level": "low" },
  "response_format": {
    "type": "text",
    "mime_type": "application/json",
    "schema": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "price_eur": { "type": "number" },
        "steep_minutes": { "type": "number" }
      },
      "required": ["name", "price_eur", "steep_minutes"]
    }
  }
}

The reply is JSON with exactly those fields, so her shop's code can use it without guessing. jq reads the price straight out: 8.

laptop: Ana's terminal
./ask card.json > card.txt
laptop: Ana's terminal
cat card.txt{"name":"Sencha green tea, 100 g tin","price_eur":8,"steep_minutes":2}
tokens: in 27, thinking 0, out 28
laptop: Ana's terminal
head -1 card.txt | jq .price_eur8

Here's the whole Run settings panel, translated. The model list is the model field. System instructions is system instruction. Thinking is thinking level. Structured output is the response format. And the temperature slider is a field the newest models ignore.

Run settings, as request fields: comparison table of In AI Studio vs In the request, Pick a model, Rules, Reasoning, JSON out

So what does Get code give you? The request you built, written in code. Here's that request in Python, with Google's Gen AI library. The client finds the key in GEMINI API KEY by itself, and every setting is a named argument: model, system instruction, thinking.

laptop: Ana's terminal
cat describe.pyfrom google import genai

client = genai.Client()  # finds the key in GEMINI_API_KEY by itself

reply = client.interactions.create(
    model="gemini-3.8-flash",
    system_instruction="You write for Ana's Tea Shop. Two short sentences. Calm, no exclamation marks.",
    input="Describe our Sencha green tea for the shop page.",
    generation_config={"thinking_level": "low"},
)
print(reply.output_text)

Ana switches to the Python environment where that library is installed, and runs it: the same kind of answer AI Studio gave her. And without the key? No API key was provided. That's the first error most people meet.

laptop: Ana's terminal
source ~/.venv/bin/activate
laptop: Ana's terminal
(.venv) ana@laptop:~/shop$ python describe.pyGently steamed leaves offer a fresh, grassy aroma with a delicate hint of sweetness. It brews into a vibrant green cup, perfect for a quiet moment of pause.
laptop: Ana's terminal
(.venv) ana@laptop:~/shop$ env -u GEMINI_API_KEY python describe.py 2>&1 | tail -1ValueError: No API key was provided. Please pass a valid API key. Learn how to create an API key at https://ai.google.dev/gemini-api/docs/api-key.

That's the whole picture. AI Studio and the code on Ana's laptop send the same kind of request to the same API. The playground is where you find the settings; your code is where they live.

Free tier, limits and your data

Now the free tier. Before she turned billing on, Ana had a key from a project without it. She sends the same request with that key: rate limit exceeded. 20 requests per day, on the free tier, and we had used them all, testing this video.

laptop: Ana's terminal
GEMINI_API_KEY=$FREE_KEY ./ask low.jsonerror: Rate limit exceeded for model gemini-3.8-flash (limit: 20 requests per day on Free Tier). Please retry in 19h43m54s or upgrade your tier at https://ai.dev/rate-limit.

Limits are counted three ways: requests per minute, tokens per minute, and requests per day. They apply to the whole project, not to one key, so a second key doesn't help. Daily limits reset at midnight, Pacific time. AI Studio shows your project's limits on its rate limit page.

How the limits work: cards of Three counters, Per project, Daily reset, Where to look

And here's the setting that isn't in the panel: billing. On the free tier, Google's terms say your prompts and replies may be used to improve its products, and human reviewers may read them. On the paid tier, like Ana's project, they're not used that way. And here's the twist: once your account has a project with an active billing account, even AI Studio's free playground counts as paid, for how your data is treated.

Free tier vs paid tier: comparison table of Free tier vs Paid tier, Used to improve products, Human reviewers, Limits, AI Studio with billing on

So the answer to the question from the forum is: it depends on billing. The terms are plain about the free tier: don't send it anything sensitive, confidential or personal. Customer emails, for example, belong on a paid project.

Teams that build on this go the same way. Sublayer, a company that makes a framework for AI agents, builds Gemini into its product through this API, with the bigger Pro model for complex tasks, and Flash for the quick ones users wait on.

Sublayer, on the Google Developers Blog: cards of Gemini API, Pro for complex tasks, Flash for speed, Same building blocks

Every command and request file from this video is linked in the description, so you can run them with your own key.

Run it yourself: cards of The ask script, Request files, The Python version, Your own key

Recap

So: AI Studio is a playground for the Gemini API. Every setting is a field in one request, Get code writes it for you, and billing decides your limits, and who may read your prompts.

If seeing the request behind each setting made AI Studio click, a like helps YouTube show this to more beginners, and subscribing brings the next one your way.

Every request here went to the real Gemini API. Thanks for watching Cloud Explainers.

Sources

Demos: one container on our own Mac standing in for Ana's laptop, sending real requests with our own keys (never shown); the tea shop is made up. Watch the full video on YouTube.

More videos

Docker10 min

What Happens When You Run a Docker Container

Claude & the Claude Developer Platform8 min

How to Fix Claude Code Billing Your API Key Instead of Your Plan

Auth (OAuth, JWT)9 min

Why Passkeys Can't Be Phished Like Passwords

PowerShell10 min

PowerShell vs Bash: Which One Should You Learn?

Linux10 min

The Linux Roadmap for Beginners

Django (Python web framework)9 min

Django vs FastAPI: Which One Should You Use?

Databases & SQL10 min

Why SQLite Is the Most Used Database in the World

Databases & SQL11 min

How a NoSQL Database Like MongoDB Works

Python11 min

How to Fix Python pip error: externally-managed-environment

Databases & SQL9 min

How to Fix MySQL Too Many Connections Database Errors

Go (Golang)9 min

Golang Concurrency Will Finally Make Sense After This

AWS10 min

How Amazon S3 Works

Kubernetes10 min

How Kubernetes Works

Git10 min

How Git Works

Docker10 min

How to Fix Docker Port Already Allocated Errors

PostgreSQL10 min

How PostgreSQL Works

Git8 min

How to Fix Git Merge Conflicts

Linux9 min

How to Fix No Space Left on Device in Linux

Networking10 min

How the Internet Works

Databases & SQL9 min

SQL vs NoSQL: When Each One Wins

Auth (OAuth, JWT)8 min

How to Fix JWT Token Expired Errors (401 Unauthorized)

Claude & the Claude Developer Platform9 min

Claude API vs Claude Pro: Why Your Subscription Doesn't Include It

AI agent skills9 min

Why AI Agent Skills Beat Giant Prompts

Linux10 min

Linux Cron Jobs Will Finally Make Sense After This

Cybersecurity10 min

Security Logs Will Finally Make Sense After This

Cybersecurity8 min

How to Fix a Security Leak: An API Key Pushed to GitHub

DNS9 min

DNS Will Finally Make Sense After This

Cybersecurity9 min

Never Ignore a Security Update

Auth (OAuth, JWT)9 min

Two-Factor Authentication Will Finally Make Sense

Networking8 min

Never Expose a Database to the Internet

Cybersecurity10 min

SSH Keys vs Passwords: Which Is Safer for Security?

Linux10 min

The 5 Levels of Linux Boot: From Power On to Login

Networking12 min

The 5 Levels of Network Firewalls

Cybersecurity10 min

Password Security: Why Hackers Crack Weak Passwords

Linux9 min

Why Your Linux Server Runs Out of Memory

Networking10 min

HTTP vs HTTPS: What Actually Changes on Your Network

Linux12 min

Every Linux File Permission You Need to Know

Linux10 min

Linux Processes vs Threads: When Each One Wins

Networking11 min

The OSI Model Will Finally Make Sense After This

Git11 min

The 7 Levels of Git

Networking10 min

Every Network Troubleshooting Command You Need

Cybersecurity10 min

Hashing vs Encryption in Cybersecurity: When Each One Wins

Networking11 min

Why the Internet Ran Out of IP Addresses

Linux11 min

Linux Package Managers: apt vs Snap vs Flatpak

Python9 min

Why Python Is Slow (and When It Doesn't Matter)

Networking11 min

TCP vs UDP: When Each One Wins

Linux8 min

Stop Running Linux as Root (Do This Instead)

Linux11 min

Linux Users and Groups Will Finally Make Sense

Cybersecurity9 min

Why Phishing Beats Good Security (and How to Spot It)

Docker12 min

The 7 Levels of Docker

AI agents & MCP12 min

AI Agents Will Finally Make Sense After This

Git8 min

Stop Using git push --force (Use This Instead)

AI agent skills10 min

Agent Skills vs MCP: When Each One Wins

Networking12 min

Networking Will Finally Make Sense After This

Linux12 min

Every Linux Command You Actually Need

Cybersecurity12 min

The 7 Levels of Cybersecurity

System design12 min

Every System Design Concept You Need, in One Diagram

PostgreSQL10 min

Why PostgreSQL Ignores Your Index