TL;DR: Google AI Studio prompts start in a free browser playground, not in code. The Run settings panel is where system instructions, safety thresholds, and structured-output schemas actually live, and Google's own reference now marks the classic responseSchema field deprecated in favor of response_format. Here's where each setting lives, and what breaks when you copy a prompt into a real integration.
What Is Google AI Studio, Exactly?
If you build with Gemini, Google AI Studio is where the actual work starts, not the API console. It's a free, browser-based playground built for one job: let you try a model and a prompt shape before you write a line of production code. Google's own quickstart guide puts it plainly: "Google AI Studio lets you quickly try out models and experiment with different prompts." From there, per the same guide, you can select Get code and your preferred programming language to use the Gemini API.
Open it and you land in the Playground, a chat-style prompt editor, open by default on a new chat prompt. That's distinct from Build mode, a separate part of AI Studio that Google's own AI-plans documentation describes as the "Code Assistant in Build mode for vibe coding" (useful for scaffolding a whole app, not what this guide covers). If you're feeding images, video, or audio into a prompt rather than plain text, Multi-Modal Prompting with Gemini covers the file-type mechanics separately. This guide stays inside the Playground's Run settings panel and the three controls developers go looking for there: system instructions, safety settings, and structured output.
How Do You Set System Instructions in AI Studio?
System instructions are the one setting that turns a generic model into your bot: a persona, a tone, or a scope constraint that applies to every turn instead of one message. In the Playground, they live in the Run settings panel, inside a field literally called System Instructions.
Google's own quickstart example is a good illustration of the mechanism, if a strange one to build: a customer chatbot that talks like an alien living on Europa. Paste the instruction "You are an alien that lives on Europa, one of Jupiter's moons." into the field, ask "What's the weather like?", and the model answers in character. Add a second instruction: "Keep your answers under 3 paragraphs long, and use an upbeat, chipper tone in your answers." The same question then gets a shorter, more consistent answer. Nothing about the user's message changed; only the system instruction did.
Two things are easy to miss once you move from the Playground to code. First, a chat prompt keeps the whole conversation in context. Google's own guide warns, "Every message between the model and user is included in the prompt, so conversational prompts can grow quite long as a conversation goes on." Second, the field itself has two different shapes depending on which endpoint your generated code targets. On the classic generateContent endpoint, systemInstruction is documented as "Developer set system instruction(s). Currently, text only." Its type is a Content object, camelCase. On the newer Interactions API, system_instruction is a plain string, snake_case, described simply as "System instruction for the interaction." Same concept, two different field shapes on two live Google endpoints. Copy a systemInstruction object into an Interactions API call, or a plain string into generateContent, and it won't do what you expect.
If you're prototyping a voice agent instead of a text chat, the equivalent setting lives in a different surface entirely: Prompting Gemini Live and Voice Mode covers the separate Live API session config.
How Do You Configure Safety Settings Without Leaving the Playground?
Safety settings are the second Run-settings control developers actually touch, because the defaults are looser than most people assume. Google's safety-settings reference, last updated September 2, 2026, states plainly: "If the threshold is not set, the default block threshold is Off for Gemini 2.5 and 3 models." Off, not a conservative middle setting.
Four categories are adjustable, each defined narrowly by Google's own guide:
- Harassment: "Negative or harmful comments targeting identity and/or protected attributes."
- Hate speech: "Content that is rude, disrespectful, or profane."
- Sexually explicit: "Contains references to sexual acts or other lewd content."
- Dangerous: "Promotes, facilitates, or encourages harmful acts."
A fifth category exists but isn't adjustable at all: Google's docs state that a separate set of protections, covering things like content that endangers child safety, is "always blocked and cannot be adjusted." That holds no matter what you set elsewhere in the four categories above.
In the Playground, click Safety settings under Advanced settings in the Run settings panel to open a modal with a slider per category. Each slider maps directly onto an API threshold string, and the two label sets rarely appear side by side in one place:
| Feature | Google AI Studio slider | API threshold string |
|---|---|---|
| Turn the filter off | Off | OFF |
| Always allow, any probability | Block none | BLOCK_NONE |
| Block only high probability | Block few | BLOCK_ONLY_HIGH |
| Block medium and high probability | Block some | BLOCK_MEDIUM_AND_ABOVE |
| Block low, medium, and high probability | Block most | BLOCK_LOW_AND_ABOVE |
In code, the same setting is a safetySettings array with a category and a threshold, sent per request rather than stored globally:
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3.8-flash",
contents="Some potentially unsafe prompt",
config=types.GenerateContentConfig(
safety_settings=[
types.SafetySetting(
category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
),
]
),
)
One distinction that trips up new integrations: a blocked prompt and a blocked response surface differently. An input blocked before generation shows up in promptFeedback.blockReason; an output blocked after generation shows up as finishReason: SAFETY on the candidate. Checking only one of the two will miss the other failure mode entirely.
How Do You Get Structured JSON Output in AI Studio?
Structured output is the third toggle developers go looking for in Run settings, right alongside function calling, code execution, and grounding, per Google's own quickstart: "AI Studio also provides the Run settings panel, where you can make adjustments to model parameters, safety settings, and toggle-on tools like structured output, function calling, code execution, and grounding." Turn it on, paste or build a JSON schema, and the model's output gets constrained to match it. Google's structured-output guide frames the benefit plainly: "This ensures predictable, type-safe results and simplifies extracting structured data from unstructured text."
Here's the part that's changed recently enough to break a lot of existing tutorials. The field that used to carry this, responseSchema on the classic generateContent endpoint, is now marked deprecated in Google's own API reference, flagged verbatim: "This item is deprecated!" Its JSON Schema alternative, _responseJsonSchema, carries the same flag. Code built against either field still runs; new guidance shouldn't point at them anymore.
The documented replacement is response_format, on the newer Interactions API: a type, a mime_type, and a schema, set like this:
interaction = client.interactions.create(
model="gemini-3.8-flash",
input=prompt,
response_format={
"type": "text",
"mime_type": "application/json",
"schema": Recipe.model_json_schema()
},
)
There's a second wrinkle worth knowing before you copy code between endpoints. generateContent didn't just deprecate its old field and stop there: its GenerationConfig reference now documents its own newer responseFormat object too, camelCase, with the same text, audio, and image shape as the Interactions API's version but a different field name (mimeType, not mime_type). Three structured-output shapes now exist across two endpoints, and only one of them, responseSchema, is actually flagged as deprecated. I couldn't confirm from a static fetch which shape AI Studio's own "Get code" button currently exports for a structured-output prompt, since that's rendered client-side with no server-rendered reference to check; before you ship whatever it hands you, compare the field name against this list rather than assuming it's current. If you're building the schema itself rather than just wiring up the field, Free JSON Prompt Generator turns a plain description into the schema shape either endpoint expects.
What Else Lives in the Run Settings Panel?
Beyond system instructions, safety, and structured output, the same panel is where AI Studio exposes the sampling controls Google calls model parameters: temperature, top-P, and top-K among them. Temperature, Top-P, Top-K: AI Sampling Parameters Explained covers what each one actually does; the detail worth flagging here is that these sliders correspond to generateContent's GenerationConfig, not to the newer Interactions API. A direct check of Google's own Interactions API reference turns up zero occurrences of temperature, top_p, frequency_penalty, or presence_penalty as request fields. The one top_k hit on that page belongs to an unrelated file-search tool's chunk-retrieval count, not to sampling. In its place, the Interactions API offers a qualitative thinking_level (minimal, low, medium, high) instead of a numeric thinking budget. If a Playground prompt you've tuned with temperature needs to move onto the Interactions API, that tuning currently has nowhere to go.
The remaining Run-settings toggles, function calling, code execution, and Google Search grounding, all carry into code as entries in a tools array rather than settings on the model itself. AI Studio's value here isn't that it invents new capability: it's that you can toggle each on, see the effect on one response, and only then decide which ones belong in the request your code actually sends.
From Playground to Production: What Does Get Code Actually Hand You?
Once a prompt behaves the way you want, Google's own words describe the next step directly: "you can use the Get code button to start coding or save your prompt to work on later and share with others." That's the actual bridge this whole guide is about: every setting covered above, system instructions, safety thresholds, structured-output schema, sampling parameters, gets serialized into a code sample in your language of choice the moment you click it.
What doesn't carry over automatically is cost. Google's own AI-plans documentation draws a hard line: "AI Studio UI only: Google AI plan benefits for developer usage apply only within the Google AI Studio web interface. Direct use of the Gemini API (such as using API keys or external applications) is billed and managed separately." A prompt that ran for free inside a Free, Pro, or Ultra Google AI plan quota in the Playground is billed through Cloud Billing the moment the same call runs as an API key request in your own code. The same page notes daily Playground quotas reset rather than accumulate, and once a plan's daily allowance is used up, requests fall through to pay-per-request API usage automatically.
Is Google AI Studio Free to Use?
Short answer: yes, within quota, and Google publishes what each tier buys. Its own AI-plans documentation lays out three levels for Playground and Build-mode usage:
| Plan | AI Studio usage | Model access and benefits |
|---|---|---|
| Free | Modest quota | Basic limits and access, with the option to upgrade for more. |
| AI Pro | Higher quota | Access to premium models like Gemini Pro, Nano Banana, and Lyria. |
| AI Ultra | Highest quota | Highest limits for prototyping, development, and advanced frontier models. |
None of that requires Cloud Billing on a credit card; it's the same Google AI consumer subscription that gates the Gemini app, extended into the developer Playground. The moment you need volume beyond your daily quota, or you're running the code you exported rather than prototyping in the browser, that's a Gemini API key with Cloud Billing enabled, billed per request, on Google's separate Gemini API pricing.
What Breaks When You Copy an AI Studio Prompt Into Your Own Code?
Four mistakes account for most of the "it worked in the Playground, why doesn't it work in my app" reports:
- Reusing a
responseSchemasnippet from an older tutorial. It still runs today, but it's the deprecated path, not the one Google's current reference points you toward. Migrate toresponse_formaton the Interactions API, or the newerresponseFormatongenerateContent, instead of copying it forward into new code. - Assuming a tuned temperature or top-P value survives a move to the Interactions API. It doesn't; that endpoint's generation config has no sampling fields at all, only
thinking_levelas a qualitative substitute. - Passing a
systemInstructionobject where a plain string is expected, or the reverse. The field's shape depends on which endpoint the generated code actually targets, not on which one you meant to use. - Assuming Playground quota tells you anything about production cost. It's a separate quota system from API-key billing, reset daily rather than accumulated, and it stops covering you the instant your code runs outside the browser.
If you're weighing Gemini against ChatGPT as you prototype, rather than just weighing endpoints within Gemini, Gemini vs ChatGPT: Prompting Differences That Matter covers the differences that actually change how you write the prompt, not just which logo is on the tab.
Stop rewriting prompts. Start shipping.
Works with ChatGPT, Claude, Gemini, Grok, Midjourney, Ideogram, Veo3 & Kling. 4.8★ on the Chrome Web Store.
Create An Account