
Google AI Studio — User Guide
Gemini in AI Studio.
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.
Apply for API Key and call Gemini
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)
```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.
The free version has lower rate limits, and production applications need to be upgraded to the paid version.
Multimodal image understanding
```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)
```Gemini analyzes chart content,
Extract data trends and key indicators,
Provide a business-level interpretation,
Strong multi-modal understanding ability.
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.
Handle very long PDF documents
```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)
```Gemini processes complete PDF documents,
No need to divide into chunks, understand the whole text at once,
Summarize accurately without omitting important information.
1 million tokens is equivalent to approximately 7.5 million English words and can handle documents of almost any length.
Compared with similar tools
| Tool | Strength | Best for | Pricing |
|---|---|---|---|
| Google AI Studio This tool | Large free limit, super long context, strong multi-modal capabilities | Developers on a limited budget who need multi-modal or very long contexts | Free version/paid version billed as per volume |
| OpenAI API | The model has the highest quality and the richest ecology | Highest quality AI capabilities required | Pay by token |
| Anthropic API | Claude has strong long context capabilities and high security | Long document processing, high security requirements | Pay by token |
| Together AI | Open source models are cheaper | Need to reduce API costs | 10x+ cheaper than OpenAI |
Sources & references:
- Google AI Studio official website (2025-03)
- Gemini API documentation (2025-03)