Skip to content

Google AI Studio

The console for controlling the model and its parameters directly, and the starting point for the Gemini API. It is the only place in the family where you set the temperature, pin a system prompt, and feed in a large amount of context at once.

What it is for

Every other product decides the model and the parameters for you. AI Studio hands them back:

What you controlWhy it helps
Which modeldifferent tasks trade cost against quality differently
Temperature and other sampling parametersaudits want reproducibility, creative work wants variety
The system promptpin the role and constraints instead of restating them
How much context goes in at oncethe precondition for auditing a large codebase

It is also the first stop on the path of "get it working in the UI, then integrate through the API".

Choosing a model

The model list changes very fast, so always re-check the official list before quoting a specific model name. Currently available and retired models are in model status in the cheatsheet and are not repeated here.

Only one principle is worth memorising: get the flow working on cheap Flash first, and only consider a stronger model once you know the prompt works. Doing it the other way round burns a lot of quota during the prompt-tuning phase.

Long-context audits

This is AI Studio's most distinctive capability relative to the other tools.

There is exactly one quotable number: the official subscription comparison lists 1,000,000-token extended context for Pro and above.

Fuller context is not better context

The real constraint on long context is not capacity but attention distribution:

How well the model uses different positions in the context (illustrative)

  utilisation
      high │ ██                                    ██
           │ ████                                ████
           │ ██████                            ██████
       low │ ████████████████████████████████████████
           └────────────────────────────────────────────
            start            middle                  end
             ↑                 ↑                      ↑
      system prompt      easily ignored          your question
      core constraints   (detail buried here      acceptance criteria
                          often does not land)

Practical conclusions:

  1. Put the most important constraints at the start, and the question plus acceptance criteria at the end
  2. Put reference material in the middle, not rules that must be obeyed
  3. Filling 1,000,000 tokens is worse than curating 200,000 — noise dilutes signal

Preparing the audit input

The key is to feed only source code and type definitions and strip the noise out. A small script assembles the input more reliably than copying by hand:

python
#!/usr/bin/env python3
"""Concatenate repository source into a single audit input for the model."""
from pathlib import Path

INCLUDE_SUFFIXES = {".ts", ".tsx", ".js", ".jsx", ".vue", ".py"}
EXCLUDE_DIRS = {
    "node_modules", "dist", "build", ".git", ".next",
    "coverage", "__pycache__", ".vitepress",
}

def collect(root: Path) -> str:
    parts = []
    for path in sorted(root.rglob("*")):
        if not path.is_file() or path.suffix not in INCLUDE_SUFFIXES:
            continue
        if EXCLUDE_DIRS & set(path.parts):
            continue
        rel = path.relative_to(root)
        parts.append(f"\n===== {rel} =====\n{path.read_text(errors='ignore')}")
    return "".join(parts)

if __name__ == "__main__":
    body = collect(Path("."))
    # Rough estimate: about 4 characters of English code per token; order of magnitude only
    print(f"~{len(body) // 4} tokens, {len(body)} characters")
    Path("audit-input.txt").write_text(body)

Paste the resulting file into AI Studio, or wire up the API following the official quickstart.

Converting characters to tokens is an order-of-magnitude estimate for judging whether a repository will fit at all. It is not a billing basis — use the official counting endpoint for accurate counts.

How you ask decides what you get

✅ Find every place that manipulates the DOM directly, list them by file, and note whether a framework API could be used instead
✅ List every circular dependency across modules
❌ Review the quality of this codebase        ← no acceptance criteria, so the output is inevitably vague

Ask one class of question at a time. Mixing them makes every answer shallow.

Tuning parameters

ScenarioTemperatureReasoning
Code audit, fact extractionLowyou want reproducibility; the same input should yield the same conclusion
Refactoring options, naming suggestionsMediumsome variety helps you compare options
Brainstorming, copywritingHighdivergence is the point

Pin the system prompt before tuning the temperature. Adjusting parameters while the prompt is still vague makes it impossible to tell which side caused a change.

Controlling cost

The AI Pro tier provides US$10/month of Google Cloud credit through the Google Developer Program (Ultra 5x gets US$40, Ultra 20x gets US$100).

The first thing to do is set a budget, not start calling APIs: GCP console → Billing → Budgets & alerts → create a budget matching the credit amount → enable 50% / 90% / 100% alerts.

Credit is money you were given, not a hard cap, and anything beyond it bills normally. A single long-context call costs far more than an interactive exchange, so running batch scripts without a budget is the easiest trap to fall into.

Billing definitions are in the official billing documentation.

Choosing between this and the others

  • want the model in your terminalGemini CLI
  • want it in your editorCode Assist
  • want autonomous code changesAntigravity / Jules
  • want to control the model itself, or to put Gemini inside your own product → AI Studio

Official resources

  • Cheatsheet — model status and the retired list
  • Cookbook — the whole-repository audit recipe

Built for frontend engineers · Powered by VitePress