Permanent $0 Free Tier · Add billing to auto-tier up to Tier 1/2/3
https://generativelanguage.googleapis.com/v1beta/openai/ 💡 Directly paste the address above as Base URL into any OpenAI-compatible client (NextChat, Cherry Studio, Immersive Translate, etc.).
gemini-3.8-flash gemini-3.5-flash-lite gemini-3.6-flash gemini-3.1-flash-lite gemini-nano-banana-2.1 gemini-3.1-flash-image gemini-3.8-flash-tts gemini-3.5-transcribe gemini-3.8-live gemini-2.5-flash Google AI Studio is Google's official developer console for the Gemini API ecosystem. With just a standard Google Account (Gmail), completely free of credit card bindings or phone billing requirements, you can create your API key in under 60 seconds. Natively features a massive 1-million (1M) token context window capable of ingesting entire books, hours of video/audio, and massive source code repositories.
The official free tier has fully upgraded to the Gemini 3.8 generation ecosystem, hosting 19 multimodal $0 models: including the new flagship gemini-3.8-flash, high-efficiency gemini-3.5-flash-lite, Nano Banana 2.1 text-to-image generator (gemini-nano-banana-2.1), native speech synthesis (TTS), audio transcription (STT), and Live real-time streaming interaction. Note: Gemini 2.0 series and Imagen 4 are completely shut down, while Gemini 2.5 is restricted to past active accounts. For all new projects, Google strongly recommends 3.8 Flash and 3.5 Flash-Lite!
Google no longer publishes fixed free RPM/RPD numbers in its documentation; quotas are dynamically allocated per Google Cloud project. If AI Studio displays 'No Cloud Projects Available', first create or link a project in cloud.google.com, then view your actual concurrency and daily limits on the AI Studio Rate Limits page.
Google officially stated that access to Gemini 2.5 models is restricted to past active users. Calling gemini-2.5-flash in new projects may return permission errors or heavy throttling. Always default to gemini-3.8-flash or gemini-3.5-flash-lite for all new implementations.
gemini-2.0-flash, gemini-2.0-flash-lite, gemini-2.0-flash-image, and imagen-4.0-generate have been permanently decommissioned by Google (Shut down). Requests to them will return 400/404 errors. For image generation, use Nano Banana 2.1 (gemini-nano-banana-2.1).
Google Gemini API does not allow cross-origin requests (no Access-Control-Allow-Origin header). Direct browser-side fetch calls will fail; requests must be proxied through a backend service (such as Next.js API Routes or Cloudflare Workers). In addition, mainland China IPs are geo-blocked, requiring global network routing.
Unlike Groq and SiliconFlow, Google explicitly notes that prompts and completions on the Free Tier may be reviewed by human reviewers and used to train future Google models. If your application handles confidential or proprietary data, bind a credit card to upgrade to the Paid Tier (which provides full privacy protections and a 10-minute rolling spend safety cap).
Google provides an official OpenAI-compatible endpoint: Set your Base URL to https://generativelanguage.googleapis.com/v1beta/openai and your header to Authorization: Bearer $YOUR_KEY. You can directly plug gemini-3.8-flash into NextChat, Cherry Studio, ChatBox, Cursor, and Roo Code without code changes!
Open Google AI Studio in your browser, log in with your Google account (Gmail), and accept the Terms of Service.
Go to Console ↗Click 'Create API key'. Select 'Create API key in new project' or link an existing Google Cloud project. Your key starting with AIza will be generated in seconds—copy and save it safely.
Enter your AIza key into your client or code, set the Base URL to https://generativelanguage.googleapis.com/v1beta/openai, select gemini-3.8-flash, and enjoy 1M context with lightning-fast inference!
from openai import OpenAI
client = OpenAI(
api_key="your_api_key_here", # 填入申请的 Key
base_url="https://generativelanguage.googleapis.com/v1beta/openai/"
)
response = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[
[object Object]
]
)
print(response.choices[0].message.content)