{"id":3562,"date":"2025-11-19T00:00:00","date_gmt":"2025-11-19T00:00:00","guid":{"rendered":"https:\/\/godofprompt.io\/blog\/2025\/11\/19\/gemini-3-api-guide\/"},"modified":"2025-11-19T00:00:00","modified_gmt":"2025-11-19T00:00:00","slug":"gemini-3-api-guide","status":"publish","type":"post","link":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/","title":{"rendered":"Gemini 3 API Guide: How To Use Google&#8217;s Most Intelligent Model"},"content":{"rendered":"<p id>Google just launched Gemini 3 Pro on November 18, 2025, and it&#8217;s not just another model update.<\/p>\n<p id>This is Google&#8217;s smartest AI yet, built on state-of-the-art reasoning that handles agentic workflows, autonomous coding, and complex multimodal tasks better than anything they&#8217;ve released before.<\/p>\n<p id>If you&#8217;re a developer building with AI, Gemini 3 changes what&#8217;s possible. <\/p>\n<p id>The catch: it works differently than previous models, and using it the same way you used Gemini 2.5 means missing most of its capabilities.<\/p>\n<p id>This guide shows you exactly how to integrate Gemini 3 into your applications, optimize for cost and performance, and avoid the common mistakes that break reasoning quality.<\/p>\n<p id>Let&#8217;s start with what makes Gemini 3 actually different.<\/p>\n<p id>\u200d<strong id>ALSO READ:<\/strong> <a href=\"https:\/\/godofprompt.ai\/blog\/introducing-chatgpt-5-1\" id>Introducing ChatGPT 5.1: Here&#8217;s Everything You Need to Know<\/a><\/p>\n<figure id class=\"w-richtext-figure-type-image w-richtext-align-fullwidth\" style=\"max-width:2400px\" data-rt-type=\"image\" data-rt-align=\"fullwidth\" data-rt-max-width=\"2400px\"><a id><\/p>\n<div id><img decoding=\"async\" src=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/6956a4bc5477bb4ad1950b34_69130b993ec445432c7281c9_690de01d9ed6b3cf56ad762e_Design_1_1200x628.webp\" alt width=\"auto\" height=\"auto\" loading=\"auto\" id><\/div>\n<p><\/a><figcaption id>Get hundreds of leads on autopilot with <a href=\"https:\/\/phantombuster.com\/?deal=oleksandr12\" id>PhantomBuster<\/a><\/figcaption><\/figure>\n<h2 id>What Is Gemini 3 Pro (And Why It Matters)<\/h2>\n<p id>Gemini 3 Pro is the first model in Google&#8217;s new Gemini 3 family, and it represents a genuine leap forward in AI capability.<\/p>\n<h3 id>What Changed From Gemini 2.5<\/h3>\n<p id><strong id>Better reasoning depth<\/strong><\/p>\n<p id>Gemini 3 scored 91.9% on GPQA Diamond (PhD-level science questions) and 95% on AIME 2025 (high school math competition). It handles complex, multi-step reasoning significantly better than Gemini 2.5.<\/p>\n<p id><strong id>Stronger multimodal understanding<\/strong><\/p>\n<p id>The model achieved 81% on MMMU-Pro (visual understanding) and 87.6% on Video-MMMU. It processes text, images, and video with much higher accuracy.<\/p>\n<p id><strong id>Autonomous coding capability<\/strong><\/p>\n<p id>On Terminal-Bench 2.0 (which tests a model&#8217;s ability to use tools and operate a computer via terminal), Gemini 3 Pro scored 54.2%. That&#8217;s production-ready agentic coding performance.<\/p>\n<h3 id>Context Window and Pricing<\/h3>\n<figure id class=\"w-richtext-figure-type-image w-richtext-align-fullwidth\" style=\"max-width:1024px\" data-rt-type=\"image\" data-rt-align=\"fullwidth\" data-rt-max-width=\"1024px\">\n<div id><img decoding=\"async\" src=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/6956a53e19d89bf239ed5eda_691d8c43d395e3017fa5b920_Context-Window-and-Pricing.avif\" loading=\"lazy\" alt=\"__wf_reserved_inherit\" width=\"auto\" height=\"auto\" id><\/div><figcaption id>Context Window and Pricing<\/figcaption><\/figure>\n<p id><strong id>Context limits:<\/strong><\/p>\n<ul id>\n<li id>1 million token input window<\/li>\n<li id>64,000 token output limit<\/li>\n<\/ul>\n<p id><strong id>Pricing (per 1 million tokens):<\/strong><\/p>\n<ul id>\n<li id>Input \u2264200k tokens: $2<\/li>\n<li id>Output \u2264200k tokens: $12<\/li>\n<li id>Input &gt;200k tokens: $4<\/li>\n<li id>Output &gt;200k tokens: $18<\/li>\n<\/ul>\n<p id>The pricing jumps when you cross 200k input tokens, so staying under that threshold saves money.<\/p>\n<h3 id>Where You Can Access Gemini 3<\/h3>\n<p id><strong id>Google AI Studio<\/strong>: Free tier with rate limits, perfect for prototyping<\/p>\n<p id><strong id>Vertex AI<\/strong>: Enterprise deployment with full controls and monitoring<\/p>\n<p id><strong id>Gemini CLI<\/strong>: Terminal-based development with Gemini 3 integration<\/p>\n<p id><strong id>Google Antigravity<\/strong>: New agentic development platform for autonomous coding<\/p>\n<p id><strong id>Third-party platforms<\/strong>: Cursor, GitHub, JetBrains, Replit, and more<\/p>\n<p id>The model is available now as <code id>gemini-3-pro-preview<\/code>, with more Gemini 3 variants coming soon.<\/p>\n<h2 id>Getting Started With Gemini 3 API<\/h2>\n<p id>Setting up Gemini 3 takes less than 15 minutes. Here&#8217;s exactly what to do.<\/p>\n<h3 id>Setting Up Your Environment<\/h3>\n<p id><strong id>Step 1: Create your Google AI Studio account<\/strong><\/p>\n<p id>Visit <a href=\"https:\/\/aistudio.google.com\/\" id>aistudio.google.com<\/a> and sign in with your Google account. You&#8217;ll land in the AI Studio interface where you can test models and generate API keys.<\/p>\n<p id><strong id>Step 2: Generate your API key<\/strong><\/p>\n<figure id class=\"w-richtext-figure-type-image w-richtext-align-fullwidth\" style=\"max-width:1366px\" data-rt-type=\"image\" data-rt-align=\"fullwidth\" data-rt-max-width=\"1366px\">\n<div id><img decoding=\"async\" src=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/6956a53e19d89bf239ed5ed4_691d8c7719701165bde3edbf_Step-2-Generate-your-API-key.avif\" loading=\"lazy\" alt=\"__wf_reserved_inherit\" width=\"auto\" height=\"auto\" id><\/div><figcaption id>Step 2 Generate your API key<\/figcaption><\/figure>\n<p id>Click the &#8220;Get API Key&#8221; button in the top right. Google generates a key immediately. Copy it and store it somewhere safe.<\/p>\n<p id>Never paste your API key directly in code or commit it to GitHub. Use environment variables instead.<\/p>\n<p id><strong id>Step 3: Install the SDK<\/strong><\/p>\n<p id>Choose your language:<\/p>\n<p id><strong id>Python (requires Python 3.9+):<\/strong><\/p>\n<blockquote id><p><code id>pip install google-generativeai<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>JavaScript\/Node:<\/strong><\/p>\n<blockquote id><p><code id>npm install @google\/generative-ai<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>REST API:<\/strong> No installation needed, just use curl or your HTTP client of choice.<\/p>\n<p id><strong id>Step 4: Make your first API call<\/strong><\/p>\n<p id><strong id>Python:<\/strong><\/p>\n<blockquote id><p><code id>from google import genai<\/p>\n<p>client = genai.Client(api_key=\"YOUR_API_KEY\")<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Explain quantum entanglement in simple terms\"<br \/>)<\/p>\n<p>print(response.text)<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>JavaScript:<\/strong><\/p>\n<blockquote id><p><code id>import { GoogleGenAI } from \"@google\/genai\";<\/p>\n<p>const ai = new GoogleGenAI({ apiKey: \"YOUR_API_KEY\" });<\/p>\n<p>async function run() {<br \/> &nbsp;const response = await ai.models.generateContent({<br \/> &nbsp; &nbsp;model: \"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents: \"Explain quantum entanglement in simple terms\"<br \/> &nbsp;});<\/p>\n<p> &nbsp;console.log(response.text);<br \/>}<\/p>\n<p>run();<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>REST:<\/strong><\/p>\n<blockquote id><p><code id>curl \"https:\/\/generativelanguage.googleapis.com\/v1beta\/models\/gemini-3-pro-preview:generateContent\" \\<br \/> &nbsp;-H \"x-goog-api-key: YOUR_API_KEY\" \\<br \/> &nbsp;-H 'Content-Type: application\/json' \\<br \/> &nbsp;-X POST \\<br \/> &nbsp;-d '{<br \/> &nbsp; &nbsp;\"contents\": [{<br \/> &nbsp; &nbsp; &nbsp;\"parts\": [{\"text\": \"Explain quantum entanglement in simple terms\"}]<br \/> &nbsp; &nbsp;}]<br \/> &nbsp;}'<br \/><\/code><\/p><\/blockquote>\n<blockquote id><p>If you get a response, you&#8217;re set up correctly.<\/p><\/blockquote>\n<h3 id>Free Tier vs Paid Access<\/h3>\n<figure id class=\"w-richtext-figure-type-image w-richtext-align-fullwidth\" style=\"max-width:1024px\" data-rt-type=\"image\" data-rt-align=\"fullwidth\" data-rt-max-width=\"1024px\">\n<div id><img decoding=\"async\" src=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/6956a53e19d89bf239ed5edd_691d8ccb64fcd99e5945b478_Free-Tier-vs-Paid-Access.avif\" loading=\"lazy\" alt=\"__wf_reserved_inherit\" width=\"auto\" height=\"auto\" id><\/div>\n<\/figure>\n<p id><strong id>What&#8217;s included in the free tier:<\/strong><\/p>\n<p id>Google AI Studio gives you free access to Gemini 3 Pro with rate limits. You can prototype, test, and build small applications without paying anything.<\/p>\n<p id><strong id>Rate limits (approximate):<\/strong><\/p>\n<ul id>\n<li id>5-10 requests per minute (RPM)<\/li>\n<li id>250,000 tokens per minute (TPM)<\/li>\n<li id>50-100 requests per day (RPD)<\/li>\n<\/ul>\n<p id>These limits are enough for development and testing, but not for production traffic.<\/p>\n<p id><strong id>When to upgrade to paid access:<\/strong><\/p>\n<p id>You need paid access when:<\/p>\n<ul id>\n<li id>Your traffic exceeds free tier limits<\/li>\n<li id>You need higher throughput<\/li>\n<li id>You&#8217;re deploying to production<\/li>\n<li id>You require enterprise features (Vertex AI)<\/li>\n<\/ul>\n<p id><strong id>Cost optimization tip:<\/strong><\/p>\n<p id>If you&#8217;re staying on the free tier, create multiple Google accounts (each gets its own key) and rotate between them. Common practice among developers staying within free limits.<\/p>\n<h2 id>Understanding Thinking Levels (Your Speed vs Intelligence Control)<\/h2>\n<p id>Gemini 3 introduces a new way to control how much reasoning the model uses.<\/p>\n<h3 id>What Thinking Levels Actually Do<\/h3>\n<p id>The <code id>thinking_level<\/code> parameter controls the maximum depth of the model&#8217;s internal reasoning process before responding.<\/p>\n<p id>Think of it like this: Gemini 3 can think longer about hard problems and respond quickly to easy ones. The thinking level sets the upper limit on how much time it takes to reason.<\/p>\n<p id><strong id>Important:<\/strong> Gemini 3 uses dynamic thinking by default. Even on <code id>high<\/code> thinking level, it won&#8217;t waste time on simple questions. It only uses deep reasoning when the prompt needs it.<\/p>\n<h3 id>Choosing The Right Thinking Level<\/h3>\n<p id><strong id><code id>low<\/code> &#8211; Minimize latency and cost<\/strong><\/p>\n<p id>Use when:<\/p>\n<ul id>\n<li id>Simple instruction following<\/li>\n<li id>Chat and conversational AI<\/li>\n<li id>High-throughput applications<\/li>\n<li id>Speed matters more than depth<\/li>\n<\/ul>\n<p id>Example: Customer support chatbot answering FAQs<\/p>\n<p id><strong id><code id>high<\/code> &#8211; Maximize reasoning depth (default)<\/strong><\/p>\n<p id>Use when:<\/p>\n<ul id>\n<li id>Complex problem-solving<\/li>\n<li id>Multi-step reasoning<\/li>\n<li id>Code generation with intricate logic<\/li>\n<li id>Accuracy matters more than speed<\/li>\n<\/ul>\n<p id>Example: Debugging race conditions in multi-threaded code<\/p>\n<p id><strong id><code id>medium<\/code> &#8211; Coming soon<\/strong><\/p>\n<p id>Will offer a balance between the two. Not available at launch.<\/p>\n<p id><strong id>Default behavior:<\/strong><\/p>\n<p id>If you don&#8217;t specify <code id>thinking_level<\/code>, Gemini 3 Pro defaults to <code id>high<\/code>. For most applications, this is what you want.<\/p>\n<h3 id>Code Examples For Each Level<\/h3>\n<p id><strong id>Python (setting to low):<\/strong><\/p>\n<p id><code id>from google import genai<\/p>\n<p>client = genai.Client()<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"What's the capital of France?\",<br \/> &nbsp; &nbsp;config={\"thinking_level\": \"low\"}<br \/>)<\/p>\n<p>print(response.text)<br \/><\/code><\/p>\n<p id><strong id>Python (default high):<\/strong><\/p>\n<p id><code id>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Find the race condition in this multi-threaded C++ snippet: [code here]\"<br \/>)<br \/># Uses high thinking level by default<br \/><\/code><\/p>\n<p id><strong id>JavaScript:<\/strong><\/p>\n<p id><code id>const response = await ai.models.generateContent({<br \/> &nbsp;model: \"gemini-3-pro-preview\",<br \/> &nbsp;contents: \"What's the capital of France?\",<br \/> &nbsp;config: { thinkingLevel: \"low\" }<br \/>});<br \/><\/code><\/p>\n<p id><strong id>REST:<\/strong><\/p>\n<p id><code id>curl \"https:\/\/generativelanguage.googleapis.com\/v1beta\/models\/gemini-3-pro-preview:generateContent\" \\<br \/> &nbsp;-H \"x-goog-api-key: $GEMINI_API_KEY\" \\<br \/> &nbsp;-H 'Content-Type: application\/json' \\<br \/> &nbsp;-X POST \\<br \/> &nbsp;-d '{<br \/> &nbsp; &nbsp;\"contents\": [{\"parts\": [{\"text\": \"What is the capital of France?\"}]}],<br \/> &nbsp; &nbsp;\"generationConfig\": {\"thinkingLevel\": \"low\"}<br \/> &nbsp;}'<br \/><\/code><\/p>\n<h3 id>Common Mistakes to Avoid<\/h3>\n<p id><strong id>Don&#8217;t use both <code id>thinking_level<\/code> and <code id>thinking_budget<\/code><\/strong><\/p>\n<p id>The old <code id>thinking_budget<\/code> parameter is still supported for backward compatibility, but using both in the same request returns a 400 error.<\/p>\n<p id>If you have old code using <code id>thinking_budget<\/code>, migrate to <code id>thinking_level<\/code> for better performance.<\/p>\n<p id><strong id>Don&#8217;t set <code id>low<\/code> for everything<\/strong><\/p>\n<p id>It&#8217;s tempting to use <code id>low<\/code> thinking for speed, but complex tasks need deep reasoning. If your results are worse after switching to <code id>low<\/code>, try <code id>high<\/code> instead.<\/p>\n<h2 id>Media Resolution: Getting The Best From Images and Video<\/h2>\n<p id>Gemini 3 gives you granular control over how it processes visual content through the <code id>media_resolution<\/code> parameter.<\/p>\n<h3 id>Why Media Resolution Matters<\/h3>\n<figure id class=\"w-richtext-figure-type-image w-richtext-align-fullwidth\" style=\"max-width:1024px\" data-rt-type=\"image\" data-rt-align=\"fullwidth\" data-rt-max-width=\"1024px\">\n<div id><img decoding=\"async\" src=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/6956a53e19d89bf239ed5ed7_691d8cf952b45ad356ef0dfb_Why-Media-Resolution-Matters.avif\" loading=\"lazy\" alt=\"__wf_reserved_inherit\" width=\"auto\" height=\"auto\" id><\/div>\n<\/figure>\n<p id>Higher resolution means:<\/p>\n<ul id>\n<li id>Better text recognition in images<\/li>\n<li id>More accurate detail identification<\/li>\n<li id>Higher token usage<\/li>\n<li id>Increased latency<\/li>\n<\/ul>\n<p id>Lower resolution means:<\/p>\n<ul id>\n<li id>Faster processing<\/li>\n<li id>Lower costs<\/li>\n<li id>Good enough for most tasks<\/li>\n<li id>May miss fine details<\/li>\n<\/ul>\n<p id>The key is matching resolution to your use case.<\/p>\n<h3 id>Choosing The Right Resolution<\/h3>\n<p id><strong id>Images: Use <code id>media_resolution_high<\/code> (1120 tokens)<\/strong><\/p>\n<p id>Recommended for most image analysis tasks. This ensures maximum quality for reading text, identifying small objects, and understanding complex visuals.<\/p>\n<p id><strong id>PDFs: Use <code id>media_resolution_medium<\/code> (560 tokens)<\/strong><\/p>\n<p id>Optimal for document understanding. Quality saturates at medium for standard documents. Going to <code id>high<\/code> rarely improves OCR results and just costs more.<\/p>\n<p id><strong id>Video (general): Use <code id>media_resolution_low<\/code> (70 tokens per frame)<\/strong><\/p>\n<p id>Sufficient for action recognition, scene description, and general video understanding.<\/p>\n<p id>Note: For video, both <code id>low<\/code> and <code id>medium<\/code> are treated identically at 70 tokens per frame to optimize context usage.<\/p>\n<p id><strong id>Video (text-heavy): Use <code id>media_resolution_high<\/code> (280 tokens per frame)<\/strong><\/p>\n<p id>Required only when reading dense text within video frames or identifying very small details.<\/p>\n<h3 id>Implementation Examples<\/h3>\n<p id><strong id>Setting resolution per image (Python):<\/strong><\/p>\n<p id><code id>from google import genai<br \/>from google.genai import types<br \/>import base64<\/p>\n<p># Media resolution is in v1alpha API<br \/>client = genai.Client(http_options={'api_version': 'v1alpha'})<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=[<br \/> &nbsp; &nbsp; &nbsp; &nbsp;types.Content(<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parts=[<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;types.Part(text=\"What is in this image?\"),<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;types.Part(<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inline_data=types.Blob(<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mime_type=\"image\/jpeg\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data=base64.b64decode(\"...\"),<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;),<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;media_resolution={\"level\": \"media_resolution_high\"}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;]<br \/> &nbsp; &nbsp; &nbsp; &nbsp;)<br \/> &nbsp; &nbsp;]<br \/>)<\/p>\n<p>print(response.text)<br \/><\/code><\/p>\n<p id><strong id>JavaScript:<\/strong><\/p>\n<p id><code id>import { GoogleGenAI } from \"@google\/genai\";<\/p>\n<p>const ai = new GoogleGenAI({ apiVersion: \"v1alpha\" });<\/p>\n<p>async function run() {<br \/> &nbsp;const response = await ai.models.generateContent({<br \/> &nbsp; &nbsp;model: \"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents: [<br \/> &nbsp; &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp; &nbsp;parts: [<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ text: \"What is in this image?\" },<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inlineData: {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mimeType: \"image\/jpeg\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data: \"...\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mediaResolution: {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;level: \"media_resolution_high\"<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;]<br \/> &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp;]<br \/> &nbsp;});<\/p>\n<p> &nbsp;console.log(response.text);<br \/>}<\/p>\n<p>run();<br \/><\/code><\/p>\n<p id><strong id>REST:<\/strong><\/p>\n<p id><code id>curl \"https:\/\/generativelanguage.googleapis.com\/v1alpha\/models\/gemini-3-pro-preview:generateContent\" \\<br \/> &nbsp;-H \"x-goog-api-key: $GEMINI_API_KEY\" \\<br \/> &nbsp;-H 'Content-Type: application\/json' \\<br \/> &nbsp;-X POST \\<br \/> &nbsp;-d '{<br \/> &nbsp; &nbsp;\"contents\": [{<br \/> &nbsp; &nbsp; &nbsp;\"parts\": [<br \/> &nbsp; &nbsp; &nbsp; &nbsp;{ \"text\": \"What is in this image?\" },<br \/> &nbsp; &nbsp; &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"inlineData\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"mimeType\": \"image\/jpeg\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"data\": \"...\"<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"mediaResolution\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"level\": \"media_resolution_high\"<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp;]<br \/> &nbsp; &nbsp;}]<br \/> &nbsp;}'<br \/><\/code><\/p>\n<p id><strong id>Global resolution configuration:<\/strong><\/p>\n<p id>You can also set media resolution globally in <code id>generation_config<\/code> instead of per-image. This applies the same setting to all media in the request.<\/p>\n<h3 id>Optimizing for Cost and Performance<\/h3>\n<p id><strong id>Cost optimization:<\/strong><\/p>\n<p id>If token usage is exceeding your context window after migrating from Gemini 2.5, explicitly reduce media resolution:<\/p>\n<ul id>\n<li id>PDFs: Try <code id>medium<\/code> instead of <code id>high<\/code><\/li>\n<li id>Video: Use <code id>low<\/code> unless OCR is critical<\/li>\n<li id>Images: Only use <code id>high<\/code> when detail truly matters<\/li>\n<\/ul>\n<p id><strong id>Performance optimization:<\/strong><\/p>\n<p id>Lower resolution processes faster. For real-time applications where speed matters, start with <code id>low<\/code> and only increase if results aren&#8217;t good enough.<\/p>\n<h2 id>Temperature Settings (Why You Should Leave It Alone)<\/h2>\n<p id>For Gemini 3, Google strongly recommends keeping temperature at the default value of 1.0.<\/p>\n<h3 id>Why Gemini 3 Works Best at Temperature 1.0<\/h3>\n<p id>Previous models often benefited from tuning temperature to control creativity versus determinism. Gemini 3&#8217;s reasoning capabilities are optimized specifically for temperature 1.0.<\/p>\n<h3 id>What Happens When You Lower Temperature<\/h3>\n<p id>Setting temperature below 1.0 can cause:<\/p>\n<ul id>\n<li id>Looping (the model repeats itself)<\/li>\n<li id>Degraded performance on complex tasks<\/li>\n<li id>Worse results on math and reasoning problems<\/li>\n<\/ul>\n<p id>This is especially true for reasoning models. The internal reasoning process works best at the default setting.<\/p>\n<h3 id>The One Exception<\/h3>\n<p id>If you&#8217;re doing something very specific that absolutely requires deterministic outputs and you&#8217;ve tested thoroughly, you might adjust temperature. But start at 1.0 and only change it if you have a compelling reason.<\/p>\n<h2 id>Thought Signatures: Maintaining Reasoning Context<\/h2>\n<p id>Thought signatures are one of the most important new concepts in Gemini 3.<\/p>\n<h3 id>What Are Thought Signatures<\/h3>\n<p id>Thought signatures are encrypted representations of the model&#8217;s internal reasoning process. They let Gemini 3 maintain its reasoning chain across multiple API calls.<\/p>\n<p id>Think of them as breadcrumbs the model leaves to remember how it arrived at conclusions. When you send a thought signature back to the model, it can continue from where it left off instead of starting fresh.<\/p>\n<h3 id>When Thought Signatures Are Critical<\/h3>\n<p id><strong id>Function calling: strict validation enforced<\/strong><\/p>\n<p id>When using function calling, thought signatures are required. Missing them returns a 400 error.<\/p>\n<p id>The model needs the signature to process tool outputs correctly. Without it, the reasoning chain breaks.<\/p>\n<p id><strong id>Text\/chat: recommended but not required<\/strong><\/p>\n<p id>For standard text generation, signatures aren&#8217;t strictly validated. But including them significantly improves reasoning quality across multi-turn conversations.<\/p>\n<p id><strong id>What happens if you omit them:<\/strong><\/p>\n<p id>For function calling: Your request fails with a 400 error.<\/p>\n<p id>For text\/chat: The model loses context and reasoning quality degrades. Follow-up questions won&#8217;t have access to the full reasoning chain.<\/p>\n<h3 id>Handling Thought Signatures Correctly<\/h3>\n<p id><strong id>Good news:<\/strong> If you use official SDKs (Python, Node, Java) with standard chat history, thought signatures are handled automatically. You don&#8217;t need to manually manage them.<\/p>\n<p id><strong id>When you need to handle them manually:<\/strong><\/p>\n<ul id>\n<li id>Building custom conversation management<\/li>\n<li id>Using REST API directly<\/li>\n<li id>Implementing advanced multi-turn workflows<\/li>\n<\/ul>\n<p id><strong id>Rules for handling signatures:<\/strong><\/p>\n<p id><strong id>Single function call:<\/strong> The <code id>functionCall<\/code> part contains one signature. Return it in your next request.<\/p>\n<p id><strong id>Parallel function calls:<\/strong> Only the first <code id>functionCall<\/code> in the list has a signature. Return parts in exact order received.<\/p>\n<p id><strong id>Multi-step sequential calls:<\/strong> Each function call has its own signature. Return all accumulated signatures in the conversation history.<\/p>\n<h3 id>Code Examples<\/h3>\n<p id><strong id>Multi-step function calling (sequential):<\/strong><\/p>\n<p id>The user asks something requiring two separate steps (like checking a flight, then booking a taxi based on the result).<\/p>\n<p id><code id>\/\/ Step 1: Model calls flight tool and returns Signature A<br \/>{<br \/> &nbsp;\"role\": \"model\",<br \/> &nbsp;\"parts\": [<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionCall\": { \"name\": \"check_flight\", \"args\": {...} },<br \/> &nbsp; &nbsp; &nbsp;\"thoughtSignature\": \"&lt;Sig_A&gt;\" \/\/ Save this<br \/> &nbsp; &nbsp;}<br \/> &nbsp;]<br \/>}<\/p>\n<p>\/\/ Step 2: You send flight result, must include Sig_A<br \/>[<br \/> &nbsp;{ \"role\": \"user\", \"parts\": [{ \"text\": \"Check flight AA100...\" }] },<br \/> &nbsp;{ <br \/> &nbsp; &nbsp;\"role\": \"model\", <br \/> &nbsp; &nbsp;\"parts\": [<br \/> &nbsp; &nbsp; &nbsp;{ <br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"functionCall\": { \"name\": \"check_flight\", \"args\": {...} }, <br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"thoughtSignature\": \"&lt;Sig_A&gt;\" \/\/ Required<br \/> &nbsp; &nbsp; &nbsp;} <br \/> &nbsp; &nbsp;]<br \/> &nbsp;},<br \/> &nbsp;{ \"role\": \"user\", \"parts\": [{ \"functionResponse\": { \"name\": \"check_flight\", \"response\": {...} } }] }<br \/>]<\/p>\n<p>\/\/ Step 3: Model calls taxi tool, returns Signature B<br \/>{<br \/> &nbsp;\"role\": \"model\",<br \/> &nbsp;\"parts\": [<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionCall\": { \"name\": \"book_taxi\", \"args\": {...} },<br \/> &nbsp; &nbsp; &nbsp;\"thoughtSignature\": \"&lt;Sig_B&gt;\" \/\/ Save this too<br \/> &nbsp; &nbsp;}<br \/> &nbsp;]<br \/>}<\/p>\n<p>\/\/ Step 4: You send taxi result, must include both Sig_A and Sig_B<br \/>[<br \/> &nbsp;\/\/ ... previous history including Sig_A ...<br \/> &nbsp;{ <br \/> &nbsp; &nbsp;\"role\": \"model\", <br \/> &nbsp; &nbsp;\"parts\": [<br \/> &nbsp; &nbsp; &nbsp; { \"functionCall\": { \"name\": \"book_taxi\", ... }, \"thoughtSignature\": \"&lt;Sig_B&gt;\" } <br \/> &nbsp; &nbsp;]<br \/> &nbsp;},<br \/> &nbsp;{ \"role\": \"user\", \"parts\": [{ \"functionResponse\": {...} }] }<br \/>]<br \/><\/code><\/p>\n<p id><strong id>Parallel function calls:<\/strong><\/p>\n<p id>User asks: &#8220;Check the weather in Paris and London.&#8221;<\/p>\n<blockquote id><p><code id>\/\/ Model response with parallel calls<br \/>{<br \/> &nbsp;\"role\": \"model\",<br \/> &nbsp;\"parts\": [<br \/> &nbsp; &nbsp;\/\/ First call has the signature<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionCall\": { \"name\": \"check_weather\", \"args\": { \"city\": \"Paris\" } },<br \/> &nbsp; &nbsp; &nbsp;\"thoughtSignature\": \"&lt;Signature_A&gt;\" <br \/> &nbsp; &nbsp;},<br \/> &nbsp; &nbsp;\/\/ Subsequent parallel calls don't have signatures<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionCall\": { \"name\": \"check_weather\", \"args\": { \"city\": \"London\" } }<br \/> &nbsp; &nbsp;} <br \/> &nbsp;]<br \/>}<\/p>\n<p>\/\/ Your response with results<br \/>{<br \/> &nbsp;\"role\": \"user\",<br \/> &nbsp;\"parts\": [<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionResponse\": { \"name\": \"check_weather\", \"response\": { \"temp\": \"15C\" } }<br \/> &nbsp; &nbsp;},<br \/> &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp;\"functionResponse\": { \"name\": \"check_weather\", \"response\": { \"temp\": \"12C\" } }<br \/> &nbsp; &nbsp;}<br \/> &nbsp;]<br \/>}<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Text\/chat with signatures:<\/strong><\/p>\n<blockquote id><p><code id>\/\/ User asks a reasoning question<br \/>[<br \/> &nbsp;{ <br \/> &nbsp; &nbsp;\"role\": \"user\", <br \/> &nbsp; &nbsp;\"parts\": [{ \"text\": \"What are the risks of this investment?\" }] <br \/> &nbsp;},<br \/> &nbsp;{ <br \/> &nbsp; &nbsp;\"role\": \"model\", <br \/> &nbsp; &nbsp;\"parts\": [<br \/> &nbsp; &nbsp; &nbsp;{<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"text\": \"Let me analyze the risks step by step. First, volatility...\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"thoughtSignature\": \"&lt;Signature_C&gt;\" \/\/ Recommended to include in follow-ups<br \/> &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp;]<br \/> &nbsp;},<br \/> &nbsp;{ <br \/> &nbsp; &nbsp;\"role\": \"user\", <br \/> &nbsp; &nbsp;\"parts\": [{ \"text\": \"Summarize that in one sentence.\" }] <br \/> &nbsp;}<br \/>]<br \/><\/code><\/p><\/blockquote>\n<h3 id>Migration From Other Models (Using the Dummy Signature)<\/h3>\n<p id>If you&#8217;re transferring a conversation from Gemini 2.5 or injecting a custom function call not generated by Gemini 3, you won&#8217;t have a valid signature.<\/p>\n<p id>To bypass strict validation in these cases, use this dummy string:<\/p>\n<blockquote id><p><code id>\"thoughtSignature\": \"context_engineering_is_the_way_to_go\"<br \/><\/code><\/p><\/blockquote>\n<p id>This lets you migrate existing conversations without breaking function calling validation.<\/p>\n<h2 id>Function Calling and Tools With Gemini 3<\/h2>\n<p id>Gemini 3 supports powerful tool integration for building agentic workflows.<\/p>\n<h3 id>Built-In Tools You Can Use<\/h3>\n<p id><strong id>Google Search grounding:<\/strong><\/p>\n<p id>Lets the model search the web for current information.<\/p>\n<blockquote id><p><code id>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"What are the latest developments in quantum computing?\",<br \/> &nbsp; &nbsp;config={\"tools\": [{\"google_search\": {}}]}<br \/>)<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>File Search:<\/strong><\/p>\n<p id>Search through uploaded files for relevant information.<\/p>\n<p id><strong id>Code Execution:<\/strong><\/p>\n<p id>The model can write and run Python code to solve problems.<\/p>\n<p id><strong id>URL Context:<\/strong><\/p>\n<p id>Fetch and process content from specific URLs.<\/p>\n<p id><strong id>What&#8217;s NOT supported:<\/strong><\/p>\n<p id>Google Maps and Computer Use are currently not supported in Gemini 3.<\/p>\n<h3 id>Custom Function Calling<\/h3>\n<p id>You can define your own tools for Gemini 3 to use.<\/p>\n<p id><strong id>Example: Weather tool<\/strong><\/p>\n<blockquote id><p><code id>weather_tool = {<br \/> &nbsp; &nbsp;\"name\": \"get_weather\",<br \/> &nbsp; &nbsp;\"description\": \"Get current weather for a location\",<br \/> &nbsp; &nbsp;\"parameters\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"type\": \"object\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"properties\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"location\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": \"string\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"description\": \"City name, e.g. 'London' or 'New York'\"<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;},<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"required\": [\"location\"]<br \/> &nbsp; &nbsp;}<br \/>}<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"What's the weather like in Tokyo?\",<br \/> &nbsp; &nbsp;config={\"tools\": [weather_tool]}<br \/>)<\/p>\n<p># Model returns a function call<br \/># You execute the function and return results<br \/># Model continues with the result<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Handling function responses:<\/strong><\/p>\n<p id>When the model calls a function, you:<\/p>\n<ol id>\n<li id>Execute the function with the provided arguments<\/li>\n<li id>Return the result as a <code id>functionResponse<\/code><\/li>\n<li id>Include the thought signature from the function call<\/li>\n<li id>Send it back to the model<\/li>\n<li id>Model continues reasoning with the result<\/li>\n<\/ol>\n<h3 id>Structured Outputs With Tools<\/h3>\n<p id>Gemini 3 lets you combine built-in tools with structured JSON output.<\/p>\n<p id>This is powerful for agentic workflows: fetch data with search or URL context, then extract it in a specific format for downstream tasks.<\/p>\n<p id><strong id>Example: Extract match results from search<\/strong><\/p>\n<p id><strong id>Python:<\/strong><\/p>\n<blockquote id><p><code id>from google import genai<br \/>from google.genai import types<br \/>from pydantic import BaseModel, Field<br \/>from typing import List<\/p>\n<p>class MatchResult(BaseModel):<br \/> &nbsp; &nbsp;winner: str = Field(description=\"The name of the winner.\")<br \/> &nbsp; &nbsp;final_match_score: str = Field(description=\"The final match score.\")<br \/> &nbsp; &nbsp;scorers: List[str] = Field(description=\"The name of the scorer.\")<\/p>\n<p>client = genai.Client()<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Search for all details for the latest Euro.\",<br \/> &nbsp; &nbsp;config={<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"tools\": [<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"google_search\": {}},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"url_context\": {}}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;],<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_mime_type\": \"application\/json\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_json_schema\": MatchResult.model_json_schema(),<br \/> &nbsp; &nbsp;}, &nbsp;<br \/>)<\/p>\n<p>result = MatchResult.model_validate_json(response.text)<br \/>print(result)<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>JavaScript:<\/strong><\/p>\n<blockquote id><p><code id>import { GoogleGenAI } from \"@google\/genai\";<br \/>import { z } from \"zod\";<br \/>import { zodToJsonSchema } from \"zod-to-json-schema\";<\/p>\n<p>const ai = new GoogleGenAI({});<\/p>\n<p>const matchSchema = z.object({<br \/> &nbsp;winner: z.string().describe(\"The name of the winner.\"),<br \/> &nbsp;final_match_score: z.string().describe(\"The final score.\"),<br \/> &nbsp;scorers: z.array(z.string()).describe(\"The name of the scorer.\")<br \/>});<\/p>\n<p>async function run() {<br \/> &nbsp;const response = await ai.models.generateContent({<br \/> &nbsp; &nbsp;model: \"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents: \"Search for all details for the latest Euro.\",<br \/> &nbsp; &nbsp;config: {<br \/> &nbsp; &nbsp; &nbsp;tools: [<br \/> &nbsp; &nbsp; &nbsp; &nbsp;{ googleSearch: {} },<br \/> &nbsp; &nbsp; &nbsp; &nbsp;{ urlContext: {} }<br \/> &nbsp; &nbsp; &nbsp;],<br \/> &nbsp; &nbsp; &nbsp;responseMimeType: \"application\/json\",<br \/> &nbsp; &nbsp; &nbsp;responseJsonSchema: zodToJsonSchema(matchSchema),<br \/> &nbsp; &nbsp;},<br \/> &nbsp;});<\/p>\n<p> &nbsp;const match = matchSchema.parse(JSON.parse(response.text));<br \/> &nbsp;console.log(match);<br \/>}<\/p>\n<p>run();<br \/><\/code><\/p><\/blockquote>\n<p id>This combines:<\/p>\n<ol id>\n<li id>Search grounding (finds current information)<\/li>\n<li id>URL context (reads full pages)<\/li>\n<li id>Structured output (extracts data in defined format)<\/li>\n<\/ol>\n<p id>All in one API call.<\/p>\n<h2 id>New API Features in Gemini 3<\/h2>\n<p id>Gemini 3 introduces new tools specifically for agentic coding workflows.<\/p>\n<h3 id>Client-Side Bash Tool<\/h3>\n<p id>The bash tool lets Gemini 3 propose shell commands as part of agentic workflows.<\/p>\n<p id><strong id>What it enables:<\/strong><\/p>\n<ul id>\n<li id>Navigate your local filesystem<\/li>\n<li id>Drive development processes<\/li>\n<li id>Automate system operations<\/li>\n<li id>Run build commands, tests, and linters<\/li>\n<\/ul>\n<p id><strong id>Security consideration:<\/strong><\/p>\n<p id>Only use the bash tool in controlled environments. Never give it unrestricted access to production systems. Implement command allowlists if exposing to untrusted inputs.<\/p>\n<p id><strong id>Use cases:<\/strong><\/p>\n<ul id>\n<li id>&#8220;Set up a new React project with TypeScript&#8221;<\/li>\n<li id>&#8220;Find all Python files larger than 1MB&#8221;<\/li>\n<li id>&#8220;Run tests and fix any failures&#8221;<\/li>\n<\/ul>\n<p id>The model proposes commands, you execute them (with proper sandboxing), and return the results.<\/p>\n<h3 id>Server-Side Bash Tool<\/h3>\n<p id>Google also offers a hosted server-side bash tool for secure prototyping.<\/p>\n<p id><strong id>What it&#8217;s for:<\/strong><\/p>\n<ul id>\n<li id>Multi-language code generation<\/li>\n<li id>Secure execution environment<\/li>\n<li id>Testing code snippets safely<\/li>\n<\/ul>\n<p id><strong id>Availability:<\/strong><\/p>\n<p id>Currently in early access with partners. General availability coming soon.<\/p>\n<h3 id>Combining Tools Effectively<\/h3>\n<p id>The real power comes from combining multiple tools in one workflow.<\/p>\n<p id><strong id>Example: Research and extract<\/strong><\/p>\n<blockquote id><p><code id># Combine search + URL context + structured output<br \/>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Find the top 3 AI models released this month and extract their key specs\",<br \/> &nbsp; &nbsp;config={<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"tools\": [<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"google_search\": {}},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"url_context\": {}}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;],<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_mime_type\": \"application\/json\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_json_schema\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": \"object\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"properties\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"models\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": \"array\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"items\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": \"object\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"properties\": {<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"name\": {\"type\": \"string\"},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"release_date\": {\"type\": \"string\"},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"context_window\": {\"type\": \"string\"},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"key_features\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;}<br \/> &nbsp; &nbsp;}<br \/>)<br \/><\/code><\/p><\/blockquote>\n<p id>This workflow:<\/p>\n<ol id>\n<li id>Searches for recent AI model releases<\/li>\n<li id>Fetches full details from URLs<\/li>\n<li id>Extracts structured data<\/li>\n<li id>Returns clean JSON<\/li>\n<\/ol>\n<p id>All automated in a single API call.<\/p>\n<h2 id>Prompting Best Practices For Gemini 3<\/h2>\n<p id>Reasoning models require different prompting strategies than instruction-following models.<\/p>\n<h3 id>How Reasoning Models Change Prompting<\/h3>\n<p id><strong id>Be precise, not verbose<\/strong><\/p>\n<p id>Gemini 3 responds best to direct, clear instructions. It doesn&#8217;t need elaborate prompting techniques designed for older models.<\/p>\n<p id><strong id>Bad prompt:<\/strong>&#8220;I would like you to carefully consider the following code snippet. Please take your time to thoroughly analyze each line, paying special attention to potential issues. Think step by step about what might go wrong&#8230;&#8221;<\/p>\n<p id><strong id>Good prompt:<\/strong>&#8220;Find the bug in this code: [code]&#8221;<\/p>\n<p id>Gemini 3&#8217;s reasoning happens internally. You don&#8217;t need to prompt it to &#8220;think step by step&#8221; \u2014 it does that automatically when needed.<\/p>\n<h3 id>Output Verbosity Control<\/h3>\n<p id><strong id>Default behavior:<\/strong><\/p>\n<p id>Gemini 3 is less verbose than Gemini 2.5. It prefers direct, efficient answers.<\/p>\n<p id>If your use case requires a conversational or detailed persona, you must explicitly steer the model.<\/p>\n<p id><strong id>Example:<\/strong><\/p>\n<blockquote id><p><code id>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Explain machine learning to a beginner. Be friendly, conversational, and include examples.\"<br \/>)<br \/><\/code><\/p><\/blockquote>\n<p id>Without the explicit instruction to be conversational, Gemini 3 gives a concise, technical answer. With it, you get the tone you want.<\/p>\n<h3 id>Context Management For Large Inputs<\/h3>\n<p id>When working with large datasets (entire books, codebases, long videos), place your instructions at the end of the prompt, after the data.<\/p>\n<p id><strong id>Structure:<\/strong><\/p>\n<p id><code id>[Large context data here - could be a full codebase, document, or video]<\/p>\n<p>Based on the information above, [your specific question or instruction]<br \/><\/code><\/p>\n<p id>This anchors the model&#8217;s reasoning to the provided data instead of relying on its training knowledge.<\/p>\n<p id><strong id>Example:<\/strong><\/p>\n<p id><code id>prompt = f\"\"\"<br \/>{entire_codebase}<\/p>\n<p>Based on the code above, identify all instances where database queries don't use parameterized statements and could be vulnerable to SQL injection.<br \/>\"\"\"<br \/><\/code><\/p>\n<p id>The phrase &#8220;Based on the information\/code\/data above&#8221; signals to the model that it should reason exclusively from the provided context.<\/p>\n<h2 id>Migrating From Gemini 2.5 to Gemini 3<\/h2>\n<p id>If you&#8217;re using Gemini 2.5, here&#8217;s what you need to update.<\/p>\n<h3 id>What Changed (And What It Means For Your Code)<\/h3>\n<p id><strong id>1. Thinking levels replace thinking budget<\/strong><\/p>\n<p id>Old way (Gemini 2.5):<\/p>\n<p id><code id>config={\"thinking_budget\": 10000}<br \/><\/code><\/p>\n<p id>New way (Gemini 3):<\/p>\n<p id><code id>config={\"thinking_level\": \"high\"}<br \/><\/code><\/p>\n<p id>The old <code id>thinking_budget<\/code> still works for backward compatibility, but <code id>thinking_level<\/code> gives more predictable performance.<\/p>\n<p id><strong id>2. Temperature should stay at 1.0<\/strong><\/p>\n<p id>If your existing code explicitly sets temperature (especially to low values for deterministic outputs), remove this parameter.<\/p>\n<p id>Gemini 3&#8217;s reasoning is optimized for temperature 1.0. Lower values can cause looping or performance degradation.<\/p>\n<p id><strong id>3. Media resolution defaults changed<\/strong><\/p>\n<p id>Default OCR resolution for PDFs is now higher. This improves accuracy but increases token usage.<\/p>\n<p id>If your requests now exceed the context window, explicitly reduce media resolution to <code id>medium<\/code> for PDFs.<\/p>\n<p id><strong id>4. Token consumption differences<\/strong><\/p>\n<p id>Migrating to Gemini 3 Pro defaults may:<\/p>\n<ul id>\n<li id>Increase token usage for PDFs (higher default resolution)<\/li>\n<li id>Decrease token usage for video (more efficient compression)<\/li>\n<\/ul>\n<p id>Monitor your token usage after migration and adjust media resolution if needed.<\/p>\n<h3 id>Migration Checklist<\/h3>\n<p id><strong id>Before migrating:<\/strong><\/p>\n<ol id>\n<li id>Identify all places using <code id>thinking_budget<\/code> \u2192 Update to <code id>thinking_level<\/code><\/li>\n<li id>Find explicit temperature settings \u2192 Remove or verify 1.0 is acceptable<\/li>\n<li id>Check PDF and document parsing workflows \u2192 Test new media resolution behavior<\/li>\n<li id>Review function calling implementations \u2192 Ensure thought signatures are handled<\/li>\n<\/ol>\n<p id><strong id>During migration:<\/strong><\/p>\n<ol id>\n<li id>Start with one endpoint or feature<\/li>\n<li id>Test thoroughly with production-like data<\/li>\n<li id>Monitor token usage and costs<\/li>\n<li id>Verify reasoning quality meets expectations<\/li>\n<\/ol>\n<p id><strong id>After migration:<\/strong><\/p>\n<ol id>\n<li id>Update monitoring dashboards for new parameters<\/li>\n<li id>Adjust budgets for potential cost changes<\/li>\n<li id>Document any prompt changes needed<\/li>\n<li id>Train team on thought signature handling<\/li>\n<\/ol>\n<h3 id>Common Migration Issues<\/h3>\n<p id><strong id>Issue: Exceeding context window with new defaults<\/strong><\/p>\n<p id>Solution: Explicitly set <code id>media_resolution: \"medium\"<\/code> for PDFs or <code id>media_resolution: \"low\"<\/code> for video.<\/p>\n<p id><strong id>Issue: Image segmentation doesn&#8217;t work<\/strong><\/p>\n<p id>Gemini 3 Pro doesn&#8217;t support pixel-level mask segmentation. For workloads requiring this, continue using Gemini 2.5 Flash with thinking turned off.<\/p>\n<p id><strong id>Issue: Results feel less verbose than Gemini 2.5<\/strong><\/p>\n<p id>Solution: Add explicit instructions for desired verbosity. Gemini 3 defaults to concise outputs.<\/p>\n<h3 id>When to Stick With Gemini 2.5<\/h3>\n<p id><strong id>Use Gemini 2.5 if you need:<\/strong><\/p>\n<ul id>\n<li id>Image segmentation capabilities<\/li>\n<li id>Exact cost predictability (while Gemini 3 pricing stabilizes)<\/li>\n<li id>A model that&#8217;s more verbose by default<\/li>\n<\/ul>\n<p id>For most use cases, Gemini 3&#8217;s reasoning improvements outweigh these limitations.<\/p>\n<h2 id>OpenAI Compatibility Layer<\/h2>\n<p id>If you&#8217;re using OpenAI-compatible endpoints, parameter mapping happens automatically.<\/p>\n<h3 id>How Parameters Map<\/h3>\n<p id><strong id>OpenAI \u2192 Gemini:<\/strong><\/p>\n<p id><code id>reasoning_effort: \"low\"<\/code> \u2192 <code id>thinking_level: \"low\"reasoning_effort: \"medium\"<\/code> \u2192 <code id>thinking_level: \"high\"reasoning_effort: \"high\"<\/code> \u2192 <code id>thinking_level: \"high\"<\/code><\/p>\n<p id>Note that OpenAI&#8217;s <code id>medium<\/code> maps to Gemini&#8217;s <code id>high<\/code> because Gemini only has two levels at launch.<\/p>\n<h3 id>What Works Automatically<\/h3>\n<ul id>\n<li id>Standard chat completions<\/li>\n<li id>Function calling<\/li>\n<li id>Structured outputs<\/li>\n<li id>Streaming<\/li>\n<\/ul>\n<h3 id>Edge Cases to Watch<\/h3>\n<p id><strong id>Temperature handling:<\/strong><\/p>\n<p id>OpenAI defaults vary by endpoint. Gemini defaults to 1.0. If your OpenAI code relies on specific temperature behavior, test thoroughly.<\/p>\n<p id><strong id>Token counting:<\/strong><\/p>\n<p id>Gemini&#8217;s tokenization differs slightly from OpenAI&#8217;s. Budget for ~10-15% variance in token counts.<\/p>\n<h2 id>Cost Optimization Strategies<\/h2>\n<p id>Gemini 3 can be expensive if you&#8217;re not careful. Here&#8217;s how to control costs.<\/p>\n<h3 id>Understanding Pricing Tiers<\/h3>\n<p id><strong id>Tier 1 (under 200k input tokens):<\/strong><\/p>\n<ul id>\n<li id>$2 per million input tokens<\/li>\n<li id>$12 per million output tokens<\/li>\n<\/ul>\n<p id><strong id>Tier 2 (over 200k input tokens):<\/strong><\/p>\n<ul id>\n<li id>$4 per million input tokens<\/li>\n<li id>$18 per million output tokens<\/li>\n<\/ul>\n<p id>Staying under 200k input tokens saves 50% on input costs and 33% on output costs.<\/p>\n<h3 id>Reducing Token Usage<\/h3>\n<p id><strong id>1. Optimize media resolution<\/strong><\/p>\n<p id>Default settings may use more tokens than you need:<\/p>\n<p id><strong id>For PDFs:<\/strong><\/p>\n<p id><code id># Default might use high, but medium is often enough<br \/>config={\"media_resolution\": \"medium\"}<br \/><\/code><\/p>\n<p id><strong id>For video:<\/strong><\/p>\n<p id><code id># Use low unless reading text in frames<br \/>config={\"media_resolution\": \"low\"}<br \/><\/code><\/p>\n<p id><strong id>For images:<\/strong><\/p>\n<p id>Only use <code id>high<\/code> when detail truly matters. Try <code id>medium<\/code> first.<\/p>\n<p id><strong id>2. Use context caching<\/strong><\/p>\n<p id>Context caching costs 90% less than regular tokens. For repeated prompts with the same context, caching saves money.<\/p>\n<p id>Minimum tokens for caching: 2,048<\/p>\n<p id><strong id>Example:<\/strong><\/p>\n<p id><code id># First request: pays full price for context<br \/># Subsequent requests within cache window: 90% discount on cached portion<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=prompt,<br \/> &nbsp; &nbsp;config={\"cached_content\": \"your-cache-id\"}<br \/>)<br \/><\/code><\/p>\n<p id><strong id>3. Batch API for high-volume requests<\/strong><\/p>\n<p id>The Batch API processes requests asynchronously at lower cost. Good for:<\/p>\n<ul id>\n<li id>Data processing pipelines<\/li>\n<li id>Bulk analysis<\/li>\n<li id>Non-time-sensitive tasks<\/li>\n<\/ul>\n<p id>Trade latency for significant cost savings.<\/p>\n<p id><strong id>4. Smart chunking strategies<\/strong><\/p>\n<p id>Instead of sending entire documents:<\/p>\n<ol id>\n<li id>Identify relevant sections first<\/li>\n<li id>Send only what&#8217;s needed<\/li>\n<li id>Use multiple smaller requests if appropriate<\/li>\n<\/ol>\n<p id><strong id>Example:<\/strong><\/p>\n<p id>Instead of sending a 500-page document, search for relevant sections and only send those 20 pages.<\/p>\n<h3 id>Monitoring and Tracking Costs<\/h3>\n<p id><strong id>Set up usage alerts in Google Cloud:<\/strong><\/p>\n<p id>Configure billing alerts to notify you when spending crosses thresholds.<\/p>\n<p id><strong id>Track per-request costs:<\/strong><\/p>\n<p id>Log token usage for each request:<\/p>\n<blockquote id><p><code id>print(f\"Input tokens: {response.usage_metadata.prompt_token_count}\")<br \/>print(f\"Output tokens: {response.usage_metadata.candidates_token_count}\")<br \/><\/code><\/p><\/blockquote>\n<blockquote id><p>Calculate cost:<\/p><\/blockquote>\n<blockquote id><p><code id>input_cost = (prompt_tokens \/ 1_000_000) * 2 &nbsp;# or 4 if &gt;200k<br \/>output_cost = (output_tokens \/ 1_000_000) * 12 &nbsp;# or 18 if &gt;200k<br \/>total_cost = input_cost + output_cost<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Identify expensive patterns:<\/strong><\/p>\n<p id>Review logs weekly to find:<\/p>\n<ul id>\n<li id>Requests using excessive tokens<\/li>\n<li id>Inefficient prompting patterns<\/li>\n<li id>Opportunities to batch or cache<\/li>\n<\/ul>\n<h2 id>Real-World Use Cases and Examples<\/h2>\n<p id>Here&#8217;s how developers are using Gemini 3 in production.<\/p>\n<h3 id>Autonomous Coding Agents<\/h3>\n<p id><strong id>Use case:<\/strong> AI pair programmer that handles full features end-to-end<\/p>\n<p id><strong id>Why Gemini 3:<\/strong><\/p>\n<ul id>\n<li id>54.2% on Terminal-Bench 2.0 (tool use via terminal)<\/li>\n<li id>Strong at multi-step reasoning<\/li>\n<li id>Handles code context well<\/li>\n<\/ul>\n<p id><strong id>Implementation:<\/strong><\/p>\n<blockquote id><p><code id># Agent gets a feature request<br \/>prompt = \"\"\"<br \/>Add user authentication to this Express.js API:<br \/>[codebase context]<\/p>\n<p>Requirements:<br \/>- JWT-based auth<br \/>- Login and signup endpoints<br \/>- Middleware for protected routes<br \/>- Password hashing with bcrypt<br \/>\"\"\"<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=prompt,<br \/> &nbsp; &nbsp;config={<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"thinking_level\": \"high\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"tools\": [{\"bash\": {}}] &nbsp;# Lets it run commands<br \/> &nbsp; &nbsp;}<br \/>)<\/p>\n<p># Agent proposes code changes, runs tests, fixes issues<br \/># All autonomously through multiple tool calls<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Result:<\/strong> Complete feature implementation with tests, done in minutes instead of hours.<\/p>\n<h3 id>Multimodal Understanding<\/h3>\n<p id><strong id>Use case:<\/strong> Analyze product images and generate descriptions for e-commerce<\/p>\n<p id><strong id>Why Gemini 3:<\/strong><\/p>\n<ul id>\n<li id>81% on MMMU-Pro (visual understanding)<\/li>\n<li id>Handles image + text context well<\/li>\n<li id>Can extract structured data<\/li>\n<\/ul>\n<p id><strong id>Implementation:<\/strong><\/p>\n<blockquote id><p><code id>from pydantic import BaseModel<br \/>from typing import List<\/p>\n<p>class ProductInfo(BaseModel):<br \/> &nbsp; &nbsp;name: str<br \/> &nbsp; &nbsp;category: str<br \/> &nbsp; &nbsp;colors: List[str]<br \/> &nbsp; &nbsp;key_features: List[str]<br \/> &nbsp; &nbsp;suggested_description: str<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=[<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"Analyze this product image and generate details\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;image_data<br \/> &nbsp; &nbsp;],<br \/> &nbsp; &nbsp;config={<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"media_resolution\": \"high\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_mime_type\": \"application\/json\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_json_schema\": ProductInfo.model_json_schema()<br \/> &nbsp; &nbsp;}<br \/>)<\/p>\n<p>product = ProductInfo.model_validate_json(response.text)<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Result:<\/strong> Accurate product details extracted from images, ready for database insertion.<\/p>\n<h3 id>Agentic Workflows<\/h3>\n<p id><strong id>Use case:<\/strong> Research assistant that finds, reads, and synthesizes information<\/p>\n<p id><strong id>Why Gemini 3:<\/strong><\/p>\n<ul id>\n<li id>Built-in search and URL tools<\/li>\n<li id>Strong reasoning for synthesis<\/li>\n<li id>Structured output support<\/li>\n<\/ul>\n<p id><strong id>Implementation:<\/strong><\/p>\n<blockquote id><p><code id>class ResearchReport(BaseModel):<br \/> &nbsp; &nbsp;summary: str<br \/> &nbsp; &nbsp;key_findings: List[str]<br \/> &nbsp; &nbsp;sources: List[str]<br \/> &nbsp; &nbsp;confidence_level: str<\/p>\n<p>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=\"Research the latest developments in solid-state batteries and summarize key breakthroughs\",<br \/> &nbsp; &nbsp;config={<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"tools\": [<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"google_search\": {}},<br \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\"url_context\": {}}<br \/> &nbsp; &nbsp; &nbsp; &nbsp;],<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"thinking_level\": \"high\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_mime_type\": \"application\/json\",<br \/> &nbsp; &nbsp; &nbsp; &nbsp;\"response_json_schema\": ResearchReport.model_json_schema()<br \/> &nbsp; &nbsp;}<br \/>)<\/p>\n<p>report = ResearchReport.model_validate_json(response.text)<br \/><\/code><\/p><\/blockquote>\n<p id><strong id>Result:<\/strong> Comprehensive research report with sources, generated in one API call.<\/p>\n<h2 id>Common Problems and Solutions<\/h2>\n<p id>Here are the issues developers hit most often with Gemini 3.<\/p>\n<h3 id>&#8220;My requests are timing out&#8221;<\/h3>\n<p id><strong id>Possible causes:<\/strong><\/p>\n<ol id>\n<li id>Input exceeds context window (1M tokens)<\/li>\n<li id>Media resolution too high for video<\/li>\n<li id>Thinking level set too high for simple task<\/li>\n<\/ol>\n<p id><strong id>Diagnosis:<\/strong><\/p>\n<p id>Check token count:<\/p>\n<p id><code id>print(f\"Tokens used: {response.usage_metadata.prompt_token_count}\")<br \/><\/code><\/p>\n<p id>Check if it&#8217;s approaching 1M.<\/p>\n<p id><strong id>Quick fixes:<\/strong><\/p>\n<p id><strong id>For large documents:<\/strong><\/p>\n<p id><code id># Reduce PDF resolution<br \/>config={\"media_resolution\": \"medium\"}<br \/><\/code><\/p>\n<p id><strong id>For video:<\/strong><\/p>\n<p id><code id># Use low resolution unless OCR needed<br \/>config={\"media_resolution\": \"low\"}<br \/><\/code><\/p>\n<p id><strong id>For simple tasks:<\/strong><\/p>\n<p id><code id># Don't use high thinking for easy questions<br \/>config={\"thinking_level\": \"low\"}<br \/><\/code><\/p>\n<h3 id>&#8220;Thought signature validation errors&#8221;<\/h3>\n<p id><strong id>Error:<\/strong> 400 bad request with message about missing thought signatures<\/p>\n<p id><strong id>Cause:<\/strong> You&#8217;re using function calling but not returning thought signatures.<\/p>\n<p id><strong id>Fix:<\/strong><\/p>\n<p id>If using official SDKs, make sure you&#8217;re using standard conversation history format. Signatures are handled automatically.<\/p>\n<p id>If using REST directly:<\/p>\n<blockquote id><p><code id>\/\/ When model returns function call with signature<br \/>{<br \/> &nbsp;\"role\": \"model\",<br \/> &nbsp;\"parts\": [{<br \/> &nbsp; &nbsp;\"functionCall\": {...},<br \/> &nbsp; &nbsp;\"thoughtSignature\": \"xyz123\" &nbsp;\/\/ Save this<br \/> &nbsp;}]<br \/>}<\/p>\n<p>\/\/ You must return it:<br \/>{<br \/> &nbsp;\"role\": \"model\",<br \/> &nbsp;\"parts\": [{<br \/> &nbsp; &nbsp;\"functionCall\": {...},<br \/> &nbsp; &nbsp;\"thoughtSignature\": \"xyz123\" &nbsp;\/\/ Include it<br \/> &nbsp;}]<br \/>}<br \/><\/code><\/p><\/blockquote>\n<h3 id>&#8220;Token usage is too high&#8221;<\/h3>\n<p id><strong id>Diagnosis steps:<\/strong><\/p>\n<ol id>\n<li id>Check media resolution settings<\/li>\n<li id>Count how many images\/video frames you&#8217;re sending<\/li>\n<li id>Look at prompt length<\/li>\n<\/ol>\n<p id><strong id>Solutions:<\/strong><\/p>\n<p id><strong id>Reduce media resolution:<\/strong><\/p>\n<p id><code id># Instead of high (1120 tokens per image)<br \/>config={\"media_resolution\": \"medium\"} &nbsp;# 560 tokens<br \/><\/code><\/p>\n<p id><strong id>Sample video frames:<\/strong><\/p>\n<p id><code id># Instead of every frame, sample every 5th frame<br \/># Most video understanding doesn't need every frame<br \/><\/code><\/p>\n<p id><strong id>Trim prompts:<\/strong><\/p>\n<p id><code id># Send only relevant code sections, not entire repo<br \/># Extract key document pages, not full PDF<br \/><\/code><\/p>\n<h3 id>&#8220;Results aren&#8217;t as good as expected&#8221;<\/h3>\n<p id><strong id>Diagnosis:<\/strong><\/p>\n<ol id>\n<li id>Check thinking level (might be too low)<\/li>\n<li id>Verify temperature is at 1.0<\/li>\n<li id>Review prompt clarity<\/li>\n<li id>Check if you need a different model<\/li>\n<\/ol>\n<p id><strong id>Solutions:<\/strong><\/p>\n<p id><strong id>Increase thinking level:<\/strong><\/p>\n<p id><code id># If using low, try high for complex tasks<br \/>config={\"thinking_level\": \"high\"}<br \/><\/code><\/p>\n<p id><strong id>Verify temperature:<\/strong><\/p>\n<p id><code id># Remove any custom temperature settings<br \/># Let it default to 1.0<br \/><\/code><\/p>\n<p id><strong id>Improve prompt:<\/strong><\/p>\n<p id><code id># Be more specific about what you want<br \/># Add examples if helpful<br \/># State constraints clearly<br \/><\/code><\/p>\n<p id><strong id>Consider model choice:<\/strong><\/p>\n<p id>For some tasks, Gemini 2.5 Flash might be better (faster, cheaper, good enough). Gemini 3 Pro is overkill for simple tasks.<\/p>\n<h2 id>Advanced Features and Techniques<\/h2>\n<p id>For production deployments, these features matter.<\/p>\n<h3 id>Context Caching<\/h3>\n<p id>Context caching lets you reuse expensive context across multiple requests at 90% lower cost.<\/p>\n<p id><strong id>When caching helps:<\/strong><\/p>\n<ul id>\n<li id>Repeated queries against same large context<\/li>\n<li id>Chatbots with long system prompts<\/li>\n<li id>Document analysis workflows<\/li>\n<li id>Code review systems<\/li>\n<\/ul>\n<p id><strong id>Minimum token requirement:<\/strong> 2,048 tokens<\/p>\n<p id><strong id>Implementation:<\/strong><\/p>\n<p id><code id># First request: establish cache<br \/>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=prompt_with_large_context,<br \/> &nbsp; &nbsp;config={\"cache_content\": True}<br \/>)<\/p>\n<p>cache_id = response.cache_id<\/p>\n<p># Subsequent requests: use cache<br \/>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=new_question,<br \/> &nbsp; &nbsp;config={\"cached_content\": cache_id}<br \/>)<br \/><\/code><\/p>\n<p id><strong id>Cost savings calculation:<\/strong><\/p>\n<p id>Without caching:<\/p>\n<ul id>\n<li id>100k token context \u00d7 $2\/1M = $0.20 per request<\/li>\n<li id>100 requests = $20<\/li>\n<\/ul>\n<p id>With caching:<\/p>\n<ul id>\n<li id>First request: $0.20<\/li>\n<li id>Next 99 requests: 100k \u00d7 $0.20\/1M = $0.02 each = $1.98<\/li>\n<li id>Total: $2.18 (saving $17.82, or 89%)<\/li>\n<\/ul>\n<h3 id>Batch API Usage<\/h3>\n<p id>The Batch API processes requests asynchronously for lower cost and higher throughput.<\/p>\n<p id><strong id>When to use batch:<\/strong><\/p>\n<ul id>\n<li id>Data processing pipelines<\/li>\n<li id>Bulk content generation<\/li>\n<li id>Analysis jobs that can wait<\/li>\n<li id>High-volume, non-interactive tasks<\/li>\n<\/ul>\n<p id><strong id>Trade-offs:<\/strong><\/p>\n<ul id>\n<li id>Lower cost (specific pricing TBD)<\/li>\n<li id>Higher throughput<\/li>\n<li id>Added latency (requests queued and processed in batches)<\/li>\n<\/ul>\n<p id><strong id>Implementation:<\/strong><\/p>\n<p id>Check the official Batch API documentation for current setup. The API is supported but pricing and specific implementation details are still being finalized.<\/p>\n<h3 id>Multi-Turn Conversations<\/h3>\n<p id>For building chatbots or assistants, proper conversation management is critical.<\/p>\n<p id><strong id>Best practices:<\/strong><\/p>\n<p id><strong id>1. Maintain full conversation history<\/strong><\/p>\n<p id><code id>conversation = []<\/p>\n<p># Add user message<br \/>conversation.append({<br \/> &nbsp; &nbsp;\"role\": \"user\",<br \/> &nbsp; &nbsp;\"parts\": [{\"text\": user_input}]<br \/>})<\/p>\n<p># Get model response<br \/>response = client.models.generate_content(<br \/> &nbsp; &nbsp;model=\"gemini-3-pro-preview\",<br \/> &nbsp; &nbsp;contents=conversation<br \/>)<\/p>\n<p># Add model response to history<br \/>conversation.append({<br \/> &nbsp; &nbsp;\"role\": \"model\",<br \/> &nbsp; &nbsp;\"parts\": response.candidates[0].content.parts<br \/>})<br \/><\/code><\/p>\n<p id><strong id>2. Handle thought signatures automatically<\/strong><\/p>\n<p id>If using official SDKs with this pattern, signatures are included automatically in <code id>response.candidates[0].content.parts<\/code>.<\/p>\n<p id><strong id>3. Manage context window<\/strong><\/p>\n<p id>Conversations can grow beyond 1M tokens. When approaching the limit:<\/p>\n<ul id>\n<li id>Summarize earlier messages<\/li>\n<li id>Drop oldest non-essential turns<\/li>\n<li id>Keep system prompt and recent context<\/li>\n<\/ul>\n<p id><code id>def trim_conversation(conversation, max_tokens=900000):<br \/> &nbsp; &nbsp;# Keep system prompt (first message) and recent messages<br \/> &nbsp; &nbsp;# Summarize or drop middle messages if needed<br \/> &nbsp; &nbsp;pass<br \/><\/code><\/p>\n<h2 id>Comparing Gemini 3 To Alternatives<\/h2>\n<p id>How does Gemini 3 stack up against other frontier models?<\/p>\n<h3 id>Gemini 3 vs GPT-5.1<\/h3>\n<p id><strong id>Gemini 3 wins on:<\/strong><\/p>\n<ul id>\n<li id>Multimodal understanding (stronger image\/video capabilities)<\/li>\n<li id>Longer context window (1M vs 128k-200k)<\/li>\n<li id>Coding benchmarks (higher scores on agentic tasks)<\/li>\n<li id>Built-in search and grounding tools<\/li>\n<\/ul>\n<p id><strong id>GPT-5.1 wins on:<\/strong><\/p>\n<ul id>\n<li id>Conversational quality (more natural, less robotic)<\/li>\n<li id>Creative writing (more varied, expressive outputs)<\/li>\n<li id>Mature ecosystem (more third-party tools and integrations)<\/li>\n<li id>Established developer community<\/li>\n<\/ul>\n<p id><strong id>Pricing:<\/strong><\/p>\n<p id>Roughly comparable for most use cases. Gemini 3 is slightly cheaper under 200k tokens.<\/p>\n<p id><strong id>When to choose Gemini 3:<\/strong><\/p>\n<ul id>\n<li id>Multimodal applications<\/li>\n<li id>Agentic coding workflows<\/li>\n<li id>Need built-in search grounding<\/li>\n<li id>Long context understanding<\/li>\n<\/ul>\n<p id><strong id>When to choose GPT-5.1:<\/strong><\/p>\n<ul id>\n<li id>Conversational AI<\/li>\n<li id>Creative content generation<\/li>\n<li id>Existing OpenAI infrastructure<\/li>\n<li id>Prefer established tooling<\/li>\n<\/ul>\n<h3 id>Gemini 3 vs Claude Sonnet 4.5<\/h3>\n<p id><strong id>Gemini 3 wins on:<\/strong><\/p>\n<ul id>\n<li id>Multimodal (Claude is primarily text)<\/li>\n<li id>Built-in tools (search, code execution)<\/li>\n<li id>Longer context (1M vs 200k)<\/li>\n<li id>Cost (cheaper per token)<\/li>\n<\/ul>\n<p id><strong id>Claude Sonnet 4.5 wins on:<\/strong><\/p>\n<ul id>\n<li id>Instruction following precision<\/li>\n<li id>Thoughtful, nuanced responses<\/li>\n<li id>Better at analysis and critique<\/li>\n<li id>More careful reasoning<\/li>\n<\/ul>\n<p id><strong id>When to choose Gemini 3:<\/strong><\/p>\n<ul id>\n<li id>Multimodal workflows<\/li>\n<li id>Need built-in grounding<\/li>\n<li id>Cost-sensitive applications<\/li>\n<li id>Agentic development<\/li>\n<\/ul>\n<p id><strong id>When to choose Claude Sonnet 4.5:<\/strong><\/p>\n<ul id>\n<li id>Pure text reasoning<\/li>\n<li id>High-stakes analysis<\/li>\n<li id>Precise instruction following<\/li>\n<li id>Document review and critique<\/li>\n<\/ul>\n<h3 id>Gemini 3 vs Gemini 2.5<\/h3>\n<p id><strong id>Gemini 3 improvements:<\/strong><\/p>\n<ul id>\n<li id>Significantly better reasoning (91.9% vs ~85% on GPQA Diamond)<\/li>\n<li id>Stronger coding (54.2% on Terminal-Bench)<\/li>\n<li id>Better multimodal understanding<\/li>\n<li id>Agentic tool use<\/li>\n<\/ul>\n<p id><strong id>Gemini 2.5 advantages:<\/strong><\/p>\n<ul id>\n<li id>More verbose by default<\/li>\n<li id>Image segmentation support<\/li>\n<li id>Well-tested, stable<\/li>\n<li id>Established best practices<\/li>\n<\/ul>\n<p id><strong id>Migration recommendation:<\/strong><\/p>\n<p id>Migrate to Gemini 3 for new projects. For existing projects, migrate gradually and test thoroughly.<\/p>\n<h2 id>Tools and Resources<\/h2>\n<p id>Here&#8217;s what you need to build with Gemini 3 effectively.<\/p>\n<h3 id>Official SDKs and Libraries<\/h3>\n<p id><strong id>Python SDK:<\/strong><\/p>\n<p id><code id>pip install google-generativeai<br \/><\/code><\/p>\n<p id>Documentation: <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\" id>ai.google.dev\/gemini-api\/docs<\/a><\/p>\n<p id><strong id>JavaScript\/Node SDK:<\/strong><\/p>\n<p id><code id>npm install @google\/generative-ai<br \/><\/code><\/p>\n<p id><strong id>REST API:<\/strong><\/p>\n<p id>Direct HTTP access for any language. Full reference at Google AI docs.<\/p>\n<p id><strong id>Community libraries:<\/strong><\/p>\n<ul id>\n<li id>LangChain: Gemini integration for chains and agents<\/li>\n<li id>LlamaIndex: Gemini support for RAG applications<\/li>\n<li id>Vercel AI SDK: Streaming Gemini responses in Next.js<\/li>\n<\/ul>\n<h3 id>Testing and Development Tools<\/h3>\n<p id><strong id>Google AI Studio:<\/strong><\/p>\n<p id>Free prototyping environment. Test prompts, compare models, generate API keys. Essential for development.<\/p>\n<p id><strong id>Apidog:<\/strong><\/p>\n<p id>API testing tool with Gemini support. Handles multimodal inputs, inspects responses, debugs endpoints efficiently.<\/p>\n<p id><strong id>Debugging techniques:<\/strong><\/p>\n<p id><strong id>Log token usage:<\/strong><\/p>\n<p id><code id>print(f\"Input: {response.usage_metadata.prompt_token_count}\")<br \/>print(f\"Output: {response.usage_metadata.candidates_token_count}\")<br \/><\/code><\/p>\n<p id><strong id>Inspect thought process:<\/strong><\/p>\n<p id>In AI Studio, enable &#8220;Show reasoning&#8221; to see how Gemini 3 thinks through problems.<\/p>\n<p id><strong id>Test with different thinking levels:<\/strong><\/p>\n<p id>Try the same prompt with <code id>low<\/code> and <code id>high<\/code> to understand the trade-offs.<\/p>\n<h3 id>Learning Resources<\/h3>\n<p id><strong id>Official documentation:<\/strong><\/p>\n<ul id>\n<li id><a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/gemini-3\" id>Gemini 3 Developer Guide<\/a><\/li>\n<li id><a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\" id>Gemini API docs<\/a><\/li>\n<li id><a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/prompting-strategies\" id>Prompting strategies guide<\/a><\/li>\n<\/ul>\n<p id><strong id>Gemini 3 Cookbook:<\/strong><\/p>\n<p id>Interactive Colab notebooks with working examples:<\/p>\n<ul id>\n<li id>Getting started<\/li>\n<li id>Thinking levels<\/li>\n<li id>Function calling<\/li>\n<li id>Multimodal use cases<\/li>\n<\/ul>\n<p id><strong id>Community forums:<\/strong><\/p>\n<ul id>\n<li id>Google AI Developer Forum<\/li>\n<li id>Reddit: r\/GoogleGemini<\/li>\n<li id>Stack Overflow: [gemini-api] tag<\/li>\n<\/ul>\n<h2 id>What&#8217;s Coming Next<\/h2>\n<p id>Gemini 3 is just the beginning of this model family.<\/p>\n<h3 id>Deep Think Mode<\/h3>\n<p id><strong id>What it is:<\/strong><\/p>\n<p id>Enhanced reasoning mode with even deeper thought chains. Achieves 93.8% on GPQA Diamond and 45.1% on ARC-AGI.<\/p>\n<p id><strong id>Status:<\/strong><\/p>\n<p id>Currently undergoing additional safety evaluations. Expected release: within weeks of launch.<\/p>\n<p id><strong id>Who gets access first:<\/strong><\/p>\n<p id>Google AI Ultra subscribers.<\/p>\n<p id><strong id>Use cases:<\/strong><\/p>\n<ul id>\n<li id>Scientific research<\/li>\n<li id>Complex mathematical reasoning<\/li>\n<li id>High-stakes analytical tasks<\/li>\n<li id>Problems requiring extensive step-by-step thinking<\/li>\n<\/ul>\n<h3 id>Additional Models in Gemini 3 Family<\/h3>\n<p id><strong id>Expected releases:<\/strong><\/p>\n<p id><strong id>Gemini 3 Flash:<\/strong><\/p>\n<p id>Optimized for speed and cost. Lower reasoning depth but much faster responses. Good for:<\/p>\n<ul id>\n<li id>High-throughput applications<\/li>\n<li id>Simple tasks<\/li>\n<li id>Real-time interactions<\/li>\n<\/ul>\n<p id><strong id>Gemini 3 Ultra:<\/strong><\/p>\n<p id>Potentially even more capable than Pro, though not yet announced.<\/p>\n<h3 id>How to Stay Updated<\/h3>\n<p id><strong id>Official channels:<\/strong><\/p>\n<ul id>\n<li id><a href=\"https:\/\/blog.google\/technology\/developers\/\" id>Google AI Blog<\/a><\/li>\n<li id><a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/changelog\" id>Gemini API changelog<\/a><\/li>\n<li id><a href=\"https:\/\/twitter.com\/googledevs\" id>@GoogleDevs on Twitter\/X<\/a><\/li>\n<\/ul>\n<p id><strong id>Developer updates:<\/strong><\/p>\n<p id>Subscribe to the Gemini API mailing list in Google AI Studio for release announcements, new features, and breaking changes.<\/p>\n<p id><strong id>Community:<\/strong><\/p>\n<p id>Join the Google AI Developer Forum for discussions, tips, and early feature testing opportunities.<\/p>\n<h2 id>Conclusion<\/h2>\n<p id>Gemini 3 represents a significant leap in what&#8217;s possible with AI.<\/p>\n<p id>The combination of state-of-the-art reasoning, multimodal understanding, and built-in agentic capabilities makes it Google&#8217;s most capable model yet. But capability means nothing if you don&#8217;t use it correctly.<\/p>\n<p id><strong id>The key takeaways:<\/strong><\/p>\n<ol id>\n<li id><strong id>Thinking levels control cost and speed<\/strong> \u2014 use <code id>low<\/code> for simple tasks, <code id>high<\/code> for complex reasoning<\/li>\n<li id><strong id>Media resolution affects both quality and cost<\/strong> \u2014 match resolution to your actual needs<\/li>\n<li id><strong id>Thought signatures are critical<\/strong> \u2014 for function calling, they&#8217;re required; for everything else, they improve quality<\/li>\n<li id><strong id>Temperature should stay at 1.0<\/strong> \u2014 Gemini 3 is optimized for this setting<\/li>\n<li id><strong id>Prompting is simpler but more precise<\/strong> \u2014 be direct, skip elaborate chain-of-thought instructions<\/li>\n<\/ol>\n<h3 id>One Action To Take Today<\/h3>\n<p id>Pick one current project using an older model. Set up a Gemini 3 API key, make one API call with your actual use case, and compare the results.<\/p>\n<p id>You&#8217;ll immediately see where Gemini 3 excels and where you might need to adjust your approach. That hands-on experience is worth more than reading any guide.<\/p>\n<p id>Start building with Gemini 3 today and see what you can create with Google&#8217;s most intelligent model.<\/p>\n<div class=\"gop-cta\" style=\"margin:32px 0;padding:24px;border-radius:12px;background:#f5f5f5;text-align:center;\"><a href=\"https:\/\/phantombuster.com\/?deal=oleksandr12\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;padding:14px 28px;background:#000;color:#fff;text-decoration:none;border-radius:8px;font-weight:600;\">Get hundreds of leads on autopilot with PhantomBuster<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to use Google\u2019s Gemini 3 API with clear steps, code examples, and best practices. This guide walks you through setup, authentication, model selection, and advanced features so you can get the most from Google\u2019s most powerful AI model.<\/p>\n","protected":false},"author":2,"featured_media":3561,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[23],"class_list":["post-3562","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","tag-tag-gemini"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Gemini 3 API Guide: How To Use Google&#039;s Most Intelligent Model | God of Prompt<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gemini 3 API Guide: How To Use Google&#039;s Most Intelligent Model | God of Prompt\" \/>\n<meta property=\"og:description\" content=\"Learn how to use Google\u2019s Gemini 3 API with clear steps, code examples, and best practices. This guide walks you through setup, authentication, model selection, and advanced features so you can get the most from Google\u2019s most powerful AI model.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"God of Prompt\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-19T00:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"550\" \/>\n\t<meta property=\"og:image:height\" content=\"308\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Prompt Copilot\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@godofprompt\" \/>\n<meta name=\"twitter:site\" content=\"@godofprompt\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prompt Copilot\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"33 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/\"},\"author\":{\"name\":\"Prompt Copilot\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#\\\/schema\\\/person\\\/f35bf51bd15fe9c3177ee570be8876da\"},\"headline\":\"Gemini 3 API Guide: How To Use Google&#8217;s Most Intelligent Model\",\"datePublished\":\"2025-11-19T00:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/\"},\"wordCount\":4320,\"publisher\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp\",\"keywords\":[\"Gemini\"],\"articleSection\":[\"Coding &amp; AI Engineering\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/\",\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/\",\"name\":\"Gemini 3 API Guide: How To Use Google's Most Intelligent Model | God of Prompt\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp\",\"datePublished\":\"2025-11-19T00:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp\",\"contentUrl\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp\",\"width\":550,\"height\":308,\"caption\":\"Gemini 3 API Guide: How To Use Google's Most Intelligent Model\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/gemini-3-api-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemini 3 API Guide: How To Use Google&#8217;s Most Intelligent Model\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/\",\"name\":\"God of Prompt\",\"description\":\"AI prompts, guides &amp; playbooks for ChatGPT, Claude, Gemini &amp; Midjourney\",\"publisher\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#organization\",\"name\":\"God of Prompt\",\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/gop-logo.png\",\"contentUrl\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/gop-logo.png\",\"width\":512,\"height\":512,\"caption\":\"God of Prompt\"},\"image\":{\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/godofprompt\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/god-of-prompt\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@god-of-prompt\",\"https:\\\/\\\/www.instagram.com\\\/godofprompt\\\/\"],\"description\":\"God of Prompt is the AI prompt platform trusted by 100,000+ marketers, founders, and creators. We publish prompts, guides, and playbooks for ChatGPT, Claude, Gemini, and Midjourney.\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/#\\\/schema\\\/person\\\/f35bf51bd15fe9c3177ee570be8876da\",\"name\":\"Prompt Copilot\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g\",\"caption\":\"Prompt Copilot\"},\"description\":\"Prompt Copilot is your AI prompting partner \u2014 a focused team of prompt engineers building the next generation of frameworks, templates, and playbooks for ChatGPT, Claude, Gemini, and Midjourney. We publish hands-on tutorials and battle-tested prompts on God of Prompt that ship real outcomes for marketers, founders, and operators. Our Mission To make prompt engineering practical. Every framework we share has been pressure-tested in real workflows \u2014 no toy examples, no clickbait. If a technique earns a place in our library, it has already shipped results in production. What you\u2019ll find on our author page Prompt frameworks \u2014 reusable structures that turn fuzzy goals into reliable outputs Tool tutorials \u2014 step-by-step guides for ChatGPT, Claude, Gemini, Midjourney Industry playbooks \u2014 vertical-specific prompt libraries for marketing, sales, ops, and more News &amp; analysis \u2014 what just shipped in AI and how it changes prompting Visit our home base Explore the full Prompt Copilot platform at prompt-copilot.ai \u2014 where the prompts live alongside our tooling, evaluations, and team workflows.\",\"sameAs\":[\"https:\\\/\\\/prompt-copilot.ai\"],\"url\":\"https:\\\/\\\/godofprompt.ai\\\/blog\\\/author\\\/prompt-copilot\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gemini 3 API Guide: How To Use Google's Most Intelligent Model | God of Prompt","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/","og_locale":"en_US","og_type":"article","og_title":"Gemini 3 API Guide: How To Use Google's Most Intelligent Model | God of Prompt","og_description":"Learn how to use Google\u2019s Gemini 3 API with clear steps, code examples, and best practices. This guide walks you through setup, authentication, model selection, and advanced features so you can get the most from Google\u2019s most powerful AI model.","og_url":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/","og_site_name":"God of Prompt","article_published_time":"2025-11-19T00:00:00+00:00","og_image":[{"width":550,"height":308,"url":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp","type":"image\/webp"}],"author":"Prompt Copilot","twitter_card":"summary_large_image","twitter_creator":"@godofprompt","twitter_site":"@godofprompt","twitter_misc":{"Written by":"Prompt Copilot","Est. reading time":"33 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#article","isPartOf":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/"},"author":{"name":"Prompt Copilot","@id":"https:\/\/godofprompt.ai\/blog\/#\/schema\/person\/f35bf51bd15fe9c3177ee570be8876da"},"headline":"Gemini 3 API Guide: How To Use Google&#8217;s Most Intelligent Model","datePublished":"2025-11-19T00:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/"},"wordCount":4320,"publisher":{"@id":"https:\/\/godofprompt.ai\/blog\/#organization"},"image":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp","keywords":["Gemini"],"articleSection":["Coding &amp; AI Engineering"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/","url":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/","name":"Gemini 3 API Guide: How To Use Google's Most Intelligent Model | God of Prompt","isPartOf":{"@id":"https:\/\/godofprompt.ai\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#primaryimage"},"image":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp","datePublished":"2025-11-19T00:00:00+00:00","breadcrumb":{"@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#primaryimage","url":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp","contentUrl":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/69ea6cba6c0e633fc8d26e49_691d7cf454d5eefc1cb1c153_Gemini-3-API-Guide.webp","width":550,"height":308,"caption":"Gemini 3 API Guide: How To Use Google's Most Intelligent Model"},{"@type":"BreadcrumbList","@id":"https:\/\/godofprompt.ai\/blog\/gemini-3-api-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/godofprompt.ai\/blog\/"},{"@type":"ListItem","position":2,"name":"Gemini 3 API Guide: How To Use Google&#8217;s Most Intelligent Model"}]},{"@type":"WebSite","@id":"https:\/\/godofprompt.ai\/blog\/#website","url":"https:\/\/godofprompt.ai\/blog\/","name":"God of Prompt","description":"AI prompts, guides &amp; playbooks for ChatGPT, Claude, Gemini &amp; Midjourney","publisher":{"@id":"https:\/\/godofprompt.ai\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/godofprompt.ai\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/godofprompt.ai\/blog\/#organization","name":"God of Prompt","url":"https:\/\/godofprompt.ai\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/godofprompt.ai\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/gop-logo.png","contentUrl":"https:\/\/godofprompt.ai\/blog\/wp-content\/uploads\/2026\/05\/gop-logo.png","width":512,"height":512,"caption":"God of Prompt"},"image":{"@id":"https:\/\/godofprompt.ai\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/godofprompt","https:\/\/www.linkedin.com\/company\/god-of-prompt\/","https:\/\/www.youtube.com\/@god-of-prompt","https:\/\/www.instagram.com\/godofprompt\/"],"description":"God of Prompt is the AI prompt platform trusted by 100,000+ marketers, founders, and creators. We publish prompts, guides, and playbooks for ChatGPT, Claude, Gemini, and Midjourney."},{"@type":"Person","@id":"https:\/\/godofprompt.ai\/blog\/#\/schema\/person\/f35bf51bd15fe9c3177ee570be8876da","name":"Prompt Copilot","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6c70d2e519eaf28b535ff1dfae246737e95380c606b9f72a163215e11b2bc824?s=96&d=mm&r=g","caption":"Prompt Copilot"},"description":"Prompt Copilot is your AI prompting partner \u2014 a focused team of prompt engineers building the next generation of frameworks, templates, and playbooks for ChatGPT, Claude, Gemini, and Midjourney. We publish hands-on tutorials and battle-tested prompts on God of Prompt that ship real outcomes for marketers, founders, and operators. Our Mission To make prompt engineering practical. Every framework we share has been pressure-tested in real workflows \u2014 no toy examples, no clickbait. If a technique earns a place in our library, it has already shipped results in production. What you\u2019ll find on our author page Prompt frameworks \u2014 reusable structures that turn fuzzy goals into reliable outputs Tool tutorials \u2014 step-by-step guides for ChatGPT, Claude, Gemini, Midjourney Industry playbooks \u2014 vertical-specific prompt libraries for marketing, sales, ops, and more News &amp; analysis \u2014 what just shipped in AI and how it changes prompting Visit our home base Explore the full Prompt Copilot platform at prompt-copilot.ai \u2014 where the prompts live alongside our tooling, evaluations, and team workflows.","sameAs":["https:\/\/prompt-copilot.ai"],"url":"https:\/\/godofprompt.ai\/blog\/author\/prompt-copilot\/"}]}},"_links":{"self":[{"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/posts\/3562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/comments?post=3562"}],"version-history":[{"count":0,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/posts\/3562\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/media\/3561"}],"wp:attachment":[{"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/media?parent=3562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/categories?post=3562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/godofprompt.ai\/blog\/wp-json\/wp\/v2\/tags?post=3562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}