# Google AI Studio

> Google AI Studio is a free, browser-based IDE by Google that provides the fastest way to prototype, test, and deploy applications using the Gemini family of multimodal generative AI models.

- Skill: `tools-only/google-ai-studio-2` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/google-ai-studio-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/google-ai-studio-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/google-ai-studio-2

---

# Google AI Studio

**Research Date**: 2026-02-23
**Source URL**: <https://aistudio.google.com/>
**GitHub Repository**: <https://github.com/google-gemini/cookbook>
**Version at Research**: Web service - no versioning
**License**: Free to use (SaaS); API terms at <https://ai.google.dev/gemini-api/terms>

---

## Overview

Google AI Studio is a free, browser-based IDE by Google that provides the fastest way to prototype, test, and deploy applications using the Gemini family of multimodal generative AI models. It serves as the primary entry point for the Gemini API, offering an interactive prompt workspace, API key management, and one-click code export in Python, JavaScript, Go, Java, C#, and REST. Developers can experiment interactively with all Gemini model variants—including text, image, video, audio, and embeddings—and then transition seamlessly to production via the `google-genai` SDK or the OpenAI-compatible endpoint.

---

## Problem Addressed

| Problem | Solution |
|---------|----------|
| High barrier to evaluating frontier LLMs interactively | Browser-based prompt playground requires no local setup; get an API key and start testing in minutes |
| Difficulty comparing prompts and model parameters systematically | Adjustable temperature, top-P, top-K, and system instruction fields with real-time response previewing |
| Cost and complexity of switching between AI providers | OpenAI-compatible REST endpoint lets existing OpenAI SDK code point at Gemini with minimal changes |
| Slow iteration loop between prototype and production code | One-click "Get code" button exports any playground conversation as runnable SDK code |
| Token cost management at scale | Context caching, Batch API (50 % cost reduction), and tiered pricing reduce production spend |
| Need for grounded, up-to-date responses | Built-in Google Search grounding and URL context tools keep model outputs factual and current |

---

## Key Statistics

| Metric | Value | Date Gathered |
|--------|-------|---------------|
| GitHub Stars (cookbook) | ~10 k (google-gemini/cookbook) | 2026-02-23 |
| Free-tier RPM (Gemini 2.5 Flash) | 10 RPM | 2026-02-23 |
| Free-tier RPD (Gemini 2.5 Flash) | 1,500 RPD | 2026-02-23 |
| Models Available | 20+ (text, image, video, audio, embeddings, robotics) | 2026-02-23 |
| Latest Stable Model | gemini-2.5-flash | 2026-02-23 |
| Latest Preview Model | gemini-3-flash-preview / gemini-3-pro-preview | 2026-02-23 |
| Max Context Window | 1 M tokens (Gemini 2.0 Flash) | 2026-02-23 |
| Paid input price (Gemini 2.5 Flash, ≤200 k tokens) | $0.50 / M tokens | 2026-02-23 |
| Paid output price (Gemini 2.5 Flash, ≤200 k tokens) | $12.00 / M tokens | 2026-02-23 |

---

## Key Features

### Interactive Prompt Playground

- Chat, single-turn, and streaming prompt modes accessible in the browser with no installation
- Adjustable generation parameters: temperature, top-P, top-K, max output tokens, stop sequences
- System instruction editor for persistent model persona and behavior configuration
- One-click export of any session as runnable SDK code (Python, JS, Go, Java, C#, REST)

### Gemini Model Family Access

- **Gemini 2.5 Pro** – highest-capability reasoning and coding model
- **Gemini 2.5 Flash** – best price-performance for high-volume tasks with thinking support
- **Gemini 2.5 Flash-Lite** – fastest, lowest-cost model for latency-sensitive workloads
- **Gemini 3 Pro / Flash Preview** – next-generation models with advanced multimodal reasoning
- **Veo 3.1 Preview** – cinematic video generation with synchronized audio
- **Imagen 4** – text-to-image up to 2 K resolution
- **Lyria** – music generation with granular instrument/BPM control
- **Gemini Embeddings** – high-dimensional vectors for semantic search and RAG
- **Gemini Robotics Preview** – embodied reasoning for robotic agents
- **Computer Use Preview** – visual screen understanding and UI automation

### Multimodal Inputs

- Accepts text, images, PDFs, audio, video, and URLs as prompt context
- File API for uploading large media assets (up to 2 GB per file, 20 GB storage)
- URL context tool fetches and reasons over live web content inline

### Agentic & Tool-Use Capabilities

- **Function calling** – structured JSON tool dispatch to external APIs
- **Code execution** – sandboxed Python interpreter runs model-generated code
- **Google Search grounding** – augments responses with real-time search results (5 k free queries/month, then $14/1 k)
- **Google Maps grounding** – location-aware spatial reasoning
- **Deep Research** – autonomous multi-step research across hundreds of sources with cited reports
- **Live API** – low-latency bidirectional streaming for voice/video agents with ephemeral token auth

### Production-Scale Features

- **Context caching** – cache repeated prompt prefixes to reduce cost on long-context workloads
- **Batch API** – asynchronous bulk inference at 50 % of standard price, 100 concurrent jobs
- **OpenAI compatibility layer** – drop-in replacement endpoint for existing OpenAI SDK integrations
- **Structured outputs** – constrained JSON generation with schema enforcement
- **Token counting API** – estimate costs before sending requests

### API Key & Usage Management

- API keys generated and managed directly in AI Studio
- Per-project rate limits visible in the AI Studio dashboard
- Usage tiers: Free → Tier 1 (billing enabled) → Tier 2 ($250 spend) → Tier 3 ($1 k spend)

---

## Technical Architecture

Google AI Studio is a stateless web front-end over the Gemini API (`generativelanguage.googleapis.com/v1beta`). Each prompt is serialized into a `GenerateContent` request containing a list of `Content` objects (role + parts), optional tool declarations, and generation config. The API supports both synchronous and streaming (`streamGenerateContent`) modes.

The SDK layer (`google-genai`) wraps the REST API with client objects that manage authentication via the `GEMINI_API_KEY` environment variable or Application Default Credentials (for Vertex AI). The same model identifiers work identically across AI Studio, the REST API, and all official SDKs.

For production scale, the Batch API accepts JSONL input files containing individual `GenerateContent` requests; jobs are queued asynchronously and results are written back as JSONL. Context caching stores reusable prompt prefixes server-side, referenced by a cache handle in subsequent requests to avoid retransmitting large contexts.

The Live API uses WebSockets to maintain a persistent session for real-time audio/video interaction, with ephemeral tokens scoping a session to a single user without exposing the main API key.

---

## Installation & Usage

```bash
# Install the official Python SDK
pip install google-genai

# Or using uv (recommended for this project)
uv add google-genai
```

```python
# Basic text generation
from google import genai

client = genai.Client()  # reads GEMINI_API_KEY env var

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Explain context caching in two sentences.",
)
print(response.text)
```

```python
# Function calling example
from google import genai
from google.genai import types

def get_weather(city: str) -> str:
    return f"The weather in {city} is 22°C and sunny."

client = genai.Client()
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="What is the weather in Tokyo?",
    config=types.GenerateContentConfig(
        tools=[get_weather],
    ),
)
print(response.text)
```

```bash
# REST API – generate content directly
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents": [{"parts": [{"text": "Summarize the Gemini API in one sentence."}]}]}'
```

---

## Relevance to Claude Code Development

### Applications

- **Prompt engineering research**: AI Studio's prompt gallery and adjustable parameter controls let developers A/B test system instructions and few-shot examples interactively—directly applicable to iterating on SKILL.md prompts and agent definitions in this repository
- **Multi-model benchmarking**: Running the same prompts against Gemini 2.5 Flash, 2.5 Pro, and 3 Pro provides empirical data on cost/quality trade-offs useful when advising users on model selection inside skills
- **Code generation evaluation**: AI Studio's code execution sandbox is a reference implementation for safe sandboxed Python execution patterns that could inspire similar tooling in skill-generation pipelines
- **Embedding-based RAG patterns**: Gemini Embeddings with File Search can serve as a reference architecture for building retrieval-augmented skill lookup systems

### Patterns Worth Adopting

- **System instruction + user message separation**: AI Studio enforces a clean separation between system instructions and user turns—a pattern Claude Code skills should also follow when composing agent prompts to keep persona stable across turns
- **One-click code export**: The pattern of generating runnable SDK code from an interactive session mirrors how Claude Code skills could auto-generate tool scaffolding from a natural-language description
- **Tiered rate-limit transparency**: Surfacing live rate-limit dashboards directly in the IDE (linked from the rate-limits docs) is a UX pattern worth adopting in Claude Code agent status dashboards
- **Ephemeral token scoping**: AI Studio's ephemeral token pattern for Live API sessions (short-lived credentials that scope a single user session) is a security best practice applicable to any multi-user agent deployment

### Integration Opportunities

- **OpenAI-compatible endpoint as a drop-in**: Claude Code plugins that target the OpenAI API can route to Gemini models with zero SDK changes, enabling multi-provider skills that fall back to Gemini when Claude API quotas are exceeded
- **Google Search grounding in research skills**: The `refresh-research` and `research-curator` skills could optionally call the Gemini API with Google Search grounding to auto-verify freshness of research entries
- **Batch API for bulk skill evaluation**: The Batch API's JSONL interface is well-suited for running evaluation harnesses over large prompt datasets—useful for automated regression testing of skill outputs
- **Context caching for large-context skills**: Skills that repeatedly inject the same large reference documents (e.g., full API specs) can use Gemini's context caching to cut token costs by caching the static prefix

---

## References

- [Google AI Studio](https://aistudio.google.com/) (accessed 2026-02-23)
- [Gemini API Overview](https://ai.google.dev/gemini-api/docs) (accessed 2026-02-23)
- [Gemini API Models](https://ai.google.dev/gemini-api/docs/models) (accessed 2026-02-23)
- [Gemini API Pricing](https://ai.google.dev/gemini-api/docs/pricing) (accessed 2026-02-23)
- [Gemini API Rate Limits](https://ai.google.dev/gemini-api/docs/rate-limits) (accessed 2026-02-23)
- [Prompt Engineering Strategies](https://ai.google.dev/gemini-api/docs/prompting-strategies) (accessed 2026-02-23)
- [Gemini Cookbook (GitHub)](https://github.com/google-gemini/cookbook) (accessed 2026-02-23)

---

## Freshness Tracking

| Field | Value |
|-------|-------|
| Last Verified | 2026-02-23 |
| Version at Verification | Web service |
| Next Review Recommended | 2026-05-23 |

