Google AI Studio

Google AI Studio — User Guide

Gemini in AI Studio.

Visit website VPN may be required Freemium Sign-up required
Strengths
  • Gemini 1.5 Pro free quota is generous (2 requests per minute)
  • Supports ultra-long context (1 million tokens)
  • Multi-modality: comprehensive processing of text, pictures, videos, and audio
  • Apply for API Key directly without waiting for review
  • Prompt debugging interface is friendly and suitable for quick testing
Best for
  • Test Gemini model capabilities for free
  • Apply for Gemini API Key for development
  • Multimodal tasks: image understanding, video analysis
  • Very long document processing (1 million token context)
  • Build Gemini-based applications

Get started quickly and apply for API

Google AI Studio is the official channel to obtain Gemini API Key, and registration is completely free.

Scenario

Apply for API Key and call Gemini

Prompt example
Steps:


1. Visit aistudio.google.com and log in with your Google account


2. Click "Get API key" in the upper left corner


3. Click "Create API key" and select the project


4. Copy the generated API Key




Python call example:


```python


import google.generativeai as genai




genai.configure(api_key="your-api-key")


model = genai.GenerativeModel("gemini-1.5-pro")




response = model.generate_content("Explain what quantum entanglement is")


print(response.text)


```
Output / what to expect

Get an API Key in minutes,

The free version can be called 2 times per minute.

50 requests per day,

Sufficient for personal projects and learning.

Tips

The free version has lower rate limits, and production applications need to be upgraded to the paid version.

Scenario

Multimodal image understanding

Prompt example
```python
import google.generativeai as genai
from PIL import Image

genai.configure(api_key="your-api-key")
model = genai.GenerativeModel("gemini-1.5-pro")

#Load images
image = Image.open("chart.png")

# Mixed image and text input
response = model.generate_content([
    "Please analyze this chart, extract key data, and provide business insights",
    image
])
print(response.text)
```
Output / what to expect

Gemini analyzes chart content,

Extract data trends and key indicators,

Provide a business-level interpretation,

Strong multi-modal understanding ability.

Tips

Gemini has strong image understanding capabilities and supports JPG, PNG, GIF, WebP and other formats.

Very long context handling

Gemini 1.5 Pro supports a context of 1 million tokens and can handle extremely long documents.

Scenario

Handle very long PDF documents

Prompt example
```python
import google.generativeai as genai

genai.configure(api_key="your-api-key")
model = genai.GenerativeModel("gemini-1.5-pro")

# Upload large PDF (max 50MB)
pdf_file = genai.upload_file("annual_report_2024.pdf")

response = model.generate_content([
    pdf_file,
    "Please summarize the core financial data of this annual report,"
    "Including revenue, profit, year-on-year growth,"
    "and management's outlook for the future"
])
print(response.text)
```
Output / what to expect

Gemini processes complete PDF documents,

No need to divide into chunks, understand the whole text at once,

Summarize accurately without omitting important information.

Tips

1 million tokens is equivalent to approximately 7.5 million English words and can handle documents of almost any length.

Compared with similar tools

ToolStrengthBest forPricing
Google AI Studio This toolLarge free limit, super long context, strong multi-modal capabilitiesDevelopers on a limited budget who need multi-modal or very long contextsFree version/paid version billed as per volume
OpenAI APIThe model has the highest quality and the richest ecologyHighest quality AI capabilities requiredPay by token
Anthropic APIClaude has strong long context capabilities and high securityLong document processing, high security requirementsPay by token
Together AIOpen source models are cheaperNeed to reduce API costs10x+ cheaper than OpenAI

Sources & references: