Skip to content
,

How to Use Google AI Studio: Free Gemini API Key, Playground and Apps (2026)

7–10 minutes
Excited woman in a purple sweater in a modern kitchen holding a white card with the Google Gemini logo, hook text: Free Gemini API key now

Google AI Studio is Google’s free web workspace for trying Gemini models, getting a Gemini API key and building small AI apps.

It is where developers start, but it is also useful for anyone who wants to test the newest Gemini models, image generation (Nano Banana), voice and video features before they reach the regular Gemini app.

This guide walks you through everything: signing in, the Playground, picking a model, getting a free API key, your first Python call, rate limits and tiers, building apps, keeping keys safe and fixing common errors. Details are checked against Google’s official Gemini API docs as of November 2026.

TL;DR

  • What: a free browser tool at aistudio.google.com to test Gemini models and create API keys.
  • API key: open API Keys in AI Studio and create one. New users get a default Google Cloud project automatically.
  • Use the key: set GEMINI_API_KEY (or GOOGLE_API_KEY) and install google-genai for Python.
  • Models today: gemini-4-argon (flagship), gemini-3.8-flash (fast, capable), Flash-Lite, Nano Banana image models, Omni video, TTS, Live and embeddings.
  • Free tier: available on an active project without billing; exact limits per model are shown on AI Studio’s rate limit page. Add billing for Tier 1 and higher limits.
  • Safety: never put API keys in GitHub or in browser/mobile app code.

What Is Google AI Studio?

AI Studio is a free web app from Google for working directly with Gemini models. You can chat with models, change settings like temperature, add files, images and video, try image and speech generation, and then copy the exact code to use the same thing in your own app.

It is also the quickest place to create a Gemini API key, which you need for coding tools, automation apps and your own projects.

AI Studio vs the Gemini App vs Vertex AI

Tool Who it is for Key difference
Gemini app (gemini.google.com) Everyone Polished assistant with Google apps, Deep Research and plans
Google AI Studio Developers, tinkerers, power users Raw model access, settings, API keys, code export
Vertex AI (Google Cloud) Companies Enterprise controls, data residency, Cloud billing

New to Gemini in general? Start with what is Google Gemini.

How to Start With AI Studio

  1. Go to aistudio.google.com and sign in with a Google account.
  2. Accept the terms. As a new user, AI Studio creates a default Google Cloud project for you.
  3. Open the Playground (chat area) from the left menu.
  4. Pick a model in the right-hand settings panel.
  5. Type a prompt and press Run. Add files or images with the plus button.
  6. Adjust settings such as temperature, output length, thinking level and tools (search grounding, code execution) where offered.
  7. Click “Get code” to copy the same request as Python, JavaScript or REST.

Some regions and accounts (for example certain work or school accounts, or users under 18) may not have access.

Which Model Should You Pick?

Model ID Type Best for
gemini-4-argon Flagship reasoning, 1M-token context Hard problems, long documents, complex coding
gemini-3.8-flash Most capable Flash Agents, coding, everyday API use (fast and cheaper)
gemini-3.5-flash-lite / gemini-3.1-flash-lite Lite High-volume, low-cost tasks
gemini-nano-banana-2.1, gemini-3-pro-image Image (Nano Banana) Image generation and editing
gemini-omni-1.1-flash Video Video generation with native audio
gemini-3.8-flash-tts Text to speech Expressive voiceovers
gemini-3.8-live Live audio Real-time voice agents
gemini-3.5-transcribe Speech to text Transcripts with speakers and timestamps
gemini-embedding-2 Embeddings Search and RAG over text, images and PDFs

Start with gemini-3.8-flash for most things and move to gemini-4-argon only when you need more reasoning. Preview models change often and have tighter limits.

Using the Playground Like a Pro

  • System instructions: set a role and rules once (“You are a strict code reviewer”).
  • Temperature: lower for facts and code, higher for brainstorming.
  • Structured output: ask for JSON with a schema so the reply is easy to parse.
  • Grounding with Google Search: turn on for current facts with sources.
  • Files and media: drop PDFs, images, audio or video and ask questions about them.
  • Compare runs: try the same prompt on two models before choosing one for your app.
  • Save prompts so you can reuse them later.

How to Get a Free Gemini API Key

  1. Open the API Keys page in AI Studio (left menu, or aistudio.google.com/apikey).
  2. Click Create API key.
  3. Choose a project. New users already have a default project. Existing Google Cloud users can bring their own via Dashboard > Projects > Import projects.
  4. Copy the key and store it in a password manager.
  5. Rename the project in the Projects view if you want to keep things tidy.
  6. Permission error? If you see “You do not have permission to create a key in this project”, ask your Google Cloud admin for a role such as Project Editor.

Keys created in AI Studio are auth keys. Google recommends restricting any standard Cloud API keys to the Gemini API only.

Your First API Call (Python)

  1. Install the SDK: pip install -U google-genai
  2. Set your key as an environment variable:
    • Windows: setx GEMINI_API_KEY "your-key" (then open a new terminal)
    • Mac/Linux: export GEMINI_API_KEY="your-key"
  3. Run this script, based on Google’s current quickstart:
    from google import genai
    
    # Reads GEMINI_API_KEY (or GOOGLE_API_KEY) from the environment
    client = genai.Client()
    
    interaction = client.interactions.create(
        model="gemini-3.8-flash",
        input="Explain how AI works in a few words",
    )
    print(interaction.output_text)

If both GEMINI_API_KEY and GOOGLE_API_KEY are set, GOOGLE_API_KEY wins. Use “Get code” in AI Studio to get matching JavaScript, Go or REST examples.

Free Tier, Rate Limits and Paid Tiers

Limits are measured in requests per minute (RPM), input tokens per minute (TPM) and requests per day (RPD). They apply per project, not per key, and daily limits reset at midnight Pacific time.

Tier How you qualify Spend safety limit
Free Active project or free trial, no billing Not applicable
Tier 1 Link an active billing account $10 per rolling 10 minutes (billing cap $250)
Tier 2 $100 paid in total and 3 days since first payment $50 per 10 minutes (cap $2,000)
Tier 3 $1,000 paid in total and 30 days since first payment $200 per 10 minutes

Exact free limits per model are shown live on AI Studio’s rate limit page, and preview models are more restricted. Some models, like premium video, may not be in the free tier at all. Current per-token prices are in our Gemini API pricing guide.

Privacy note: check the Gemini API terms for how free-tier prompts may be used. Do not send confidential data on the free tier.

Build and Share Apps

AI Studio can also generate small web apps from a description, so you can prototype a tool (for example a recipe generator or a PDF summariser) without setting up a project. You can then download the code or keep working on it in your own editor.

For serious apps, move the code to a backend so your key stays on the server. If you like coding with AI, compare Claude Code vs Gemini CLI. To give Gemini apps structured, rule-based choices, see our Gemini Decisions API guide.

Keep Your API Key Safe

  1. Never commit keys to Git or paste them in public forums.
  2. Never put keys in browser or mobile app code. Call Gemini from your own backend instead.
  3. Use environment variables locally and a secret manager in production.
  4. Set billing alerts in Google Cloud once billing is on.
  5. Restrict keys by API and origin where possible.
  6. If a key leaks: create a new key, update your app, disable the old key and check usage logs.

Troubleshooting

Problem Fix
429 / RESOURCE_EXHAUSTED You hit RPM, TPM or RPD; wait, slow down, or enable billing for Tier 1
API key not valid Copy the key again, check the environment variable name, restart the terminal
Permission denied creating a key Ask a Cloud admin for Project Editor or the listed IAM permissions
Model not found Check the exact model ID on the models page; preview IDs change
AI Studio not available Region, age or workspace admin restriction; try a personal account
Wrong key used Both GOOGLE_API_KEY and GEMINI_API_KEY set; GOOGLE_API_KEY takes priority
Free tier missing a model Some models (for example premium video) need billing

My Take

AI Studio is the best free way to explore what Gemini can really do, with the newest models, raw settings and one-click code. Grab a key, test your prompt in the Playground, then copy the code into your project.

Keep keys on the server, watch your rate limits, and add billing only when your app outgrows the free tier.

FAQ

Is Google AI Studio free?

Yes. Using AI Studio and the free API tier costs nothing; you only pay after linking billing and using paid limits or models.

How do I get a Gemini API key?

Sign in to aistudio.google.com, open API Keys and click Create API key.

What is the difference between AI Studio and Gemini?

The Gemini app is a consumer assistant. AI Studio gives developers direct model access, settings and API keys.

What are the Gemini API free tier limits?

They vary by model and are shown on AI Studio’s rate limit page. Limits apply per project and daily limits reset at midnight Pacific time.

Which environment variable does the Gemini SDK use?

GEMINI_API_KEY or GOOGLE_API_KEY. If both are set, GOOGLE_API_KEY is used.

Can I use AI Studio for image and video generation?

Yes, with Nano Banana image models and Omni video models, subject to tier and availability.

Is it safe to put my Gemini API key in a website?

No. Anyone can read it. Keep it on a backend server.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Excited woman in a purple sweater in a modern kitchen holding a white card with the Google Gemini logo, hook text: Free Gemini API key now