# Google AI Studio

> Google AI Studio is a free, browser-based IDE and developer playground for building applications with Google's Gemini family of models.

- Skill: `tools-only/google-ai-studio` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/google-ai-studio`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/google-ai-studio/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

---

# Google AI Studio

**Research Date**: 2026-02-23
**Source URL**: <https://aistudio.google.com/>
**Documentation**: <https://ai.google.dev/gemini-api/docs>
**GitHub (Cookbook)**: <https://github.com/google-gemini/cookbook>
**Version at Research**: Gemini 2.5 Pro / Gemini 3 (preview)
**License**: Free tier available; paid usage billed per token via Google account

---

## Overview

Google AI Studio is a free, browser-based IDE and developer playground for building applications with Google's Gemini family of models. It provides prompt authoring, API key generation, model parameter tuning, code export in six languages, and direct access to every Gemini model variant through a single interface — all without any local installation.

**Core Value Proposition**: The fastest path from prompt idea to production-ready Gemini API call — developers iterate on prompts in the browser and export working SDK code (Python, JavaScript, Go, Java, C#, REST) in one click, then scale with pay-as-you-go billing.

---

## Problem Addressed

| Problem | Solution |
|---------|----------|
| Setting up a local LLM development environment is time-consuming | Fully browser-based; API key + playground available in under 2 minutes |
| Iterating on multimodal prompts requires complex tooling | Drag-and-drop file upload for images, audio, video, and PDFs directly in the chat prompt |
| Migrating from OpenAI clients to Gemini requires API rewrites | OpenAI-compatible endpoint (`generativelanguage.googleapis.com/v1beta/openai/`) accepts the OpenAI SDK with only the base URL and API key changed |
| Integrating real-time web data in agents requires separate search integrations | Google Search grounding built in natively — 5,000 free queries/month, then $14/1,000 queries |
| Managing long-context inputs is expensive without caching | Context caching stores repeated prefixes; charged per token-hour of storage at $4.50/1M tokens/hour |
| Real-time voice/video AI interactions require custom WebSocket infrastructure | Live API provides managed bidirectional streaming sessions with ephemeral token support |
| Generating structured data reliably requires prompt engineering | Native structured output (JSON schema) forces model to produce schema-conformant responses |

---

## Key Statistics (as of 2026-02-23)

| Metric | Value | Date Gathered |
|--------|-------|---------------|
| Cookbook GitHub Stars | 16,543 | 2026-02-23 |
| Cookbook Forks | 2,477 | 2026-02-23 |
| Cookbook License | Apache 2.0 | 2026-02-23 |
| Free tier RPM (Gemini 2.5 Flash) | 10 requests/min | 2026-02-23 |
| Free tier RPD (Gemini 2.5 Flash) | 500 requests/day | 2026-02-23 |
| Max context window | 1,000,000 tokens (Gemini 2.5 Pro) | 2026-02-23 |
| Supported SDK languages | 6 (Python, JS/TS, Go, Java, C#, REST) | 2026-02-23 |

---

## Key Features

### Model Access

- **Gemini 2.5 Flash** — best price/performance; low-latency, high-volume tasks with reasoning; 1M token context
- **Gemini 2.5 Pro** — most capable model for complex tasks; deep reasoning, coding, long-context analysis; 1M token context; $2–$4/1M input, $12–$18/1M output
- **Gemini 3** (preview) — latest generation, available in AI Studio for early access
- **Gemini 2.5 Flash-Lite** — lowest-cost model; $0.10/1M input tokens
- **Imagen 4** — text-to-image generation up to 2K resolution; ultrafast and standard modes
- **Veo 3.1 Preview** — cinematic video generation with native audio sync
- **Lyria Experimental** — high-fidelity music generation with BPM, instrument, and composition controls
- **Computer Use Preview** — model that sees a screen and performs UI actions (click, type, navigate)
- **Deep Research Preview** — agentic model that autonomously plans and executes multi-step research across hundreds of sources
- **Gemini Embeddings** — high-dimensional vector representations for semantic search and RAG

### Prompt Engineering Workspace

- **Chat, text, and structured prompt modes** — switch between freeform chat, single-turn text completion, and structured input/output templates
- **System instructions** — configure model persona and behavior constraints before conversation
- **Parameter controls** — tune temperature, top-P, top-K, max output tokens, and safety settings per request
- **Token counter** — live token count displayed as prompt grows
- **Prompt gallery** — curated prompt templates for common tasks

### API Key & Code Export

- **One-click API key generation** — create and manage Gemini API keys directly in AI Studio; keys work across all 6 SDK languages
- **Get code button** — exports current prompt configuration as runnable SDK code in Python, JavaScript, Go, Java, C#, or cURL
- **OpenAI compatibility layer** — swap base URL and API key in existing OpenAI code; no other changes required

### Built-in Tools & Integrations

- **Google Search grounding** — real-time web data injected into context automatically; supports citation tracking; 5,000 free queries/month
- **Google Maps grounding** — geographic and location data grounding (paid tier)
- **Code execution sandbox** — model writes and runs Python in a secure sandbox, returning results
- **URL context** — model fetches and reads web pages as part of the prompt
- **Function calling** — define tool schemas; model selects and invokes tools with structured arguments
- **File search** — vector-based file retrieval for document Q&A

### Context Caching

- Store repeated prompt prefixes (e.g., large system prompts, reference documents) and reference them cheaply across requests
- Cache storage charged at $4.50/1M tokens/hour; cached input tokens charged at $0.20–$0.40/1M (vs full input price)

### Batch API

- Submit up to 50% cheaper asynchronous batch jobs for offline processing
- Results returned within 24 hours; suited for evaluation, data labeling, bulk generation

### Live API

- Managed bidirectional WebSocket sessions for real-time voice and video AI
- Ephemeral tokens for secure client-side connections without exposing server API keys
- Session management with automatic reconnection handling

---

## Technical Architecture

Google AI Studio is a single-page web application (Angular-based) backed by the `alkalimakersuite-pa.clients6.google.com` API. Under the hood it wraps the **Gemini API** (`generativelanguage.googleapis.com/v1beta/`), which is the same API developers use directly.

```text
Browser (AI Studio UI)
    │
    ▼
Gemini API (generativelanguage.googleapis.com/v1beta/)
    │
    ├── /models/{model}:generateContent       (standard generation)
    ├── /models/{model}:streamGenerateContent  (streaming)
    ├── /models/{model}:countTokens            (token counting)
    ├── /cachedContents                        (context caching CRUD)
    ├── /files                                 (file upload for multimodal)
    └── /v1beta/openai/                        (OpenAI-compatible endpoint)
```

Authentication uses API keys passed in the `x-goog-api-key` header (or `Authorization: Bearer` for OAuth). The free tier routes through Google's shared quota pool; the paid tier bills per token via Google Cloud billing accounts.

---

## Installation & Usage

No installation needed for AI Studio itself — visit <https://aistudio.google.com/> and sign in with a Google account.

**SDK Installation (Python)**:

```bash
pip install google-genai
# or with uv:
uv add google-genai
```

**Basic usage**:

```python
import os
from google import genai

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Explain how AI works in a few words",
)
print(response.text)
```

**OpenAI drop-in migration** (zero code change beyond config):

```python
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["GEMINI_API_KEY"],
    base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
)

response = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "Explain how AI works"}],
)
print(response.choices[0].message.content)
```

**Google Search grounding**:

```python
from google import genai
from google.genai import types

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="What are the latest AI news today?",
    config=types.GenerateContentConfig(
        tools=[types.Tool(google_search=types.GoogleSearch())]
    ),
)
print(response.text)
```

---

## Relevance to Claude Code Development

### Applications

- **Evaluate alternative providers**: Use AI Studio to prototype with Gemini models and compare output quality, cost, and latency against Claude for specific tasks within skill/agent workflows
- **Multimodal research inputs**: Gemini's 1M-token context window with native file upload is useful for processing large corpora (PDFs, videos, long code dumps) that would exceed Claude's context in research workflows
- **OpenAI-compatible skills**: Skills built with the OpenAI Python SDK can be pointed at the Gemini API endpoint with no code changes — useful for multi-provider resilience in agent infrastructure
- **Batch evaluation pipelines**: The Batch API's 50% discount makes Gemini a cost-effective backend for running evaluation harnesses against large test sets

### Patterns Worth Adopting

- **One-click code export pattern**: AI Studio generates valid, runnable SDK code from any prompt configuration — a pattern worth implementing in Claude Code skill generators (export a worked example alongside the skill documentation)
- **Ephemeral token pattern**: AI Studio's Live API uses short-lived tokens for client-side connections — directly applicable to any skill or MCP server that needs to expose AI capabilities to browser clients without leaking server credentials
- **System instruction + parameter preset bundles**: AI Studio allows saving prompt configs as named "prompts" with all parameters — mirrors the approach of skill YAML frontmatter bundles in this repository
- **Grounding-first architecture**: Structuring agent research steps to call Google Search grounding as a first pass before deeper analysis reduces hallucination in research workflows

### Integration Opportunities

- **Multi-provider fallback in research-curator**: Add Gemini 2.5 Flash as a fallback model when Claude is rate-limited during batch research waves
- **Deep Research agent pattern**: Google's Deep Research model (autonomous multi-step research over hundreds of sources) is a direct analog to the `research-curator` skill's batch orchestration — studying its output format could inform improvements to research entry quality
- **Computer Use for browser automation**: Gemini Computer Use Preview enables screen-reading automation — complementary to the `agent-browser` skill for environments where Playwright is unavailable
- **Gemini Embeddings for skill retrieval**: Semantic search over research entries and skills using `gemini-embedding-001` could power a local skill discovery tool

### Competitive Analysis

| Feature | Google AI Studio / Gemini API | Claude / Anthropic API |
|---------|-------------------------------|------------------------|
| Context window | 1M tokens (Gemini 2.5 Pro) | 200K tokens (Claude 3.7) |
| Web playground | Yes (AI Studio) | Yes (claude.ai) |
| OpenAI compatibility | Yes (drop-in endpoint) | No |
| Built-in web search | Yes (Google Search grounding) | No (requires MCP) |
| Batch API discount | 50% off | No native batch API |
| Computer use | Yes (preview) | Yes (beta) |
| Free tier | Yes (rate-limited) | No |
| Multimodal inputs | Text, image, audio, video, PDF | Text, image, PDF |

---

## References

- [Google AI Studio](https://aistudio.google.com/) (accessed 2026-02-23)
- [Gemini API Documentation](https://ai.google.dev/gemini-api/docs) (accessed 2026-02-23)
- [Gemini API Pricing](https://ai.google.dev/gemini-api/docs/pricing) (accessed 2026-02-23)
- [Gemini API Models](https://ai.google.dev/gemini-api/docs/models) (accessed 2026-02-23)
- [OpenAI Compatibility Guide](https://ai.google.dev/gemini-api/docs/openai) (accessed 2026-02-23)
- [Gemini Cookbook (GitHub)](https://github.com/google-gemini/cookbook) (accessed 2026-02-23)
- [Live API Documentation](https://ai.google.dev/gemini-api/docs/live) (accessed 2026-02-23)
- [Batch API Documentation](https://ai.google.dev/gemini-api/docs/batch-api) (accessed 2026-02-23)

---

## Freshness Tracking

| Field | Value |
|-------|-------|
| Last Verified | 2026-02-23 |
| Version at Verification | Gemini 2.5 Pro / Gemini 3 preview |
| Next Review Recommended | 2026-05-23 |

