Skip to content

Gemini 3.1 Flash Live Preview on Google AI Studio

Google AI Studio / Gemini API Free API tier

The catch: Outside the EEA, Switzerland and the UK, free-tier prompts and outputs are used to improve Google products and may be read by human reviewers. Exact limits are only visible inside AI Studio, and 2.5 models are limited to past users.

AccessFree API tier
Free limitsLegacy Live API preview, free of charge on the free tier (Standard). Shuts down 17 Nov 2026 (replacement: gemini-3.8-live). RPM/RPD shown only in AI Studio.
Modalityaudio, text, image, video
Credit cardNot required
Commercial useAllowed
Trains on your dataYes, on the free tier
Licence or termsGoogle APIs Terms of Service + Gemini API Additional Terms of Service (effective 23 Mar 2026)
Context window131,072 tokens
Model idgemini-3.1-flash-live-preview
Base URLwss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent
Last checked8 Oct 2026

How to use Gemini 3.1 Flash Live Preview

It speaks the OpenAI API at wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent, so the OpenAI SDK you already use works once you change the base URL and key.

Quickstart
# Live API runs over a WebSocket, not REST. pip install google-genai
import asyncio, os
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
config = {"response_modalities": ["AUDIO"]}
async def main():
    async with client.aio.live.connect(model="gemini-3.1-flash-live-preview", config=config) as session:
        print("connected")  # then stream audio with session.send_realtime_input(...)
asyncio.run(main())
Paste into Claude Code
I want to use the free AI model "Gemini 3.1 Flash Live Preview" from Google AI Studio (model id: gemini-3.1-flash-live-preview) in my project.
Please:
1. Check the provider docs and give me the exact steps to get a free API key.
2. Give me a minimal working example that reads the key from an environment variable.
3. Tell me the real free limits and any catch (commercial use, card, data use). Listed limits: Limits shown after sign-in.
4. If the same provider has a more generous free option, mention it.

Before you ship on it

  • Outside the EEA, Switzerland and the UK, free-tier prompts and outputs are used to improve Google products and may be read by human reviewers. Exact limits are only visible inside AI Studio, and 2.5 models are limited to past users.
  • Prompts on the free tier may be used to train models. Keep customer data off it.
  • Gemini API Additional Terms (effective 23 Mar 2026): use is 'for developers building with Google AI models for professional or business purposes, not for consumer use'. No ban on commercial use of unpaid quota, but 'You…
  • Free tiers are shared capacity: treat the limits as a ceiling, not a promise, and keep a paid fallback.

Questions

Is Gemini 3.1 Flash Live Preview on Google AI Studio free?

Yes. Google AI Studio offers it as free api tier, with these limits: Limits shown after sign-in. No credit card is needed.

Can I use Gemini 3.1 Flash Live Preview on Google AI Studio commercially?

Yes, under Google APIs Terms of Service + Gemini API Additional Terms of Service (effective 23 Mar 2026). Check the current terms before you ship.

How do I start with Gemini 3.1 Flash Live Preview on Google AI Studio?

It speaks the OpenAI API at wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent, so the OpenAI SDK you already use works once you change the base URL and key.

Source: ai.google.dev/gemini-api/docs/pricing, checked 8 Oct 2026.